diff options
| -rw-r--r-- | spec/models/chouette/journey_pattern_spec.rb | 4 | ||||
| -rw-r--r-- | spec/models/custom_field_spec.rb | 2 | ||||
| -rw-r--r-- | spec/models/simple_json_exporter_spec.rb | 10 | 
3 files changed, 8 insertions, 8 deletions
| diff --git a/spec/models/chouette/journey_pattern_spec.rb b/spec/models/chouette/journey_pattern_spec.rb index 078e3c1f1..02a54f056 100644 --- a/spec/models/chouette/journey_pattern_spec.rb +++ b/spec/models/chouette/journey_pattern_spec.rb @@ -1,7 +1,7 @@  require 'spec_helper'  describe Chouette::JourneyPattern, :type => :model do -   +    subject { create(:journey_pattern) }    describe 'checksum' do @@ -92,7 +92,7 @@ describe Chouette::JourneyPattern, :type => :model do      let(:journey_pattern) { create :journey_pattern }      let(:distances){ [] }      it "should raise an error" do -      expect{journey_pattern.set_distances(distances)}.to raise_error +      expect{journey_pattern.set_distances(distances)}.to raise_error(RuntimeError)      end      context "with consistent data" do diff --git a/spec/models/custom_field_spec.rb b/spec/models/custom_field_spec.rb index 4c1b65a15..ce6ce9fa5 100644 --- a/spec/models/custom_field_spec.rb +++ b/spec/models/custom_field_spec.rb @@ -52,7 +52,7 @@ RSpec.describe CustomField, type: :model do      end      it "should not break initailizartion if the model does not have the :custom_field_values attribute" do -      expect{Chouette::VehicleJourney.where(id: vj.id).select(:id).last}.to_not raise_error(ActiveModel::MissingAttributeError) +      expect{Chouette::VehicleJourney.where(id: vj.id).select(:id).last}.to_not raise_error      end      it "should validate the value" do diff --git a/spec/models/simple_json_exporter_spec.rb b/spec/models/simple_json_exporter_spec.rb index 4b48dc732..afecf7e51 100644 --- a/spec/models/simple_json_exporter_spec.rb +++ b/spec/models/simple_json_exporter_spec.rb @@ -5,7 +5,7 @@ RSpec.describe SimpleJsonExporter do          SimpleJsonExporter.define :foo          expect do            SimpleJsonExporter.new(configuration_name: :test).export -        end.to raise_error +        end.to raise_error(RuntimeError)        end      end      context "with a complete configuration" do @@ -18,9 +18,9 @@ RSpec.describe SimpleJsonExporter do        it "should define an exporter" do          expect{SimpleJsonExporter.find_configuration(:foo)}.to_not raise_error          expect{SimpleJsonExporter.new(configuration_name: :foo, filepath: "").export}.to_not raise_error -        expect{SimpleJsonExporter.find_configuration(:bar)}.to raise_error -        expect{SimpleJsonExporter.new(configuration_name: :bar, filepath: "")}.to raise_error -        expect{SimpleJsonExporter.new(configuration_name: :bar, filepath: "").export}.to raise_error +        expect{SimpleJsonExporter.find_configuration(:bar)}.to raise_error(RuntimeError) +        expect{SimpleJsonExporter.new(configuration_name: :bar, filepath: "")}.to raise_error(RuntimeError) +        expect{SimpleJsonExporter.new(configuration_name: :bar, filepath: "").export}.to raise_error(RuntimeError)          expect{SimpleJsonExporter.create(configuration_name: :foo, filepath: "")}.to change{SimpleJsonExporter.count}.by 1        end      end @@ -33,7 +33,7 @@ RSpec.describe SimpleJsonExporter do              config.add_field :name              config.add_field :name            end -        end.to raise_error +        end.to raise_error(RuntimeError)        end      end    end | 
