Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update dependency on RSpec

  • Loading branch information...
commit 330eed801b8bc40812d82df4c0daa7484798ab1e 1 parent 4311689
@joshuaclayton joshuaclayton authored
View
14 Gemfile.lock
@@ -53,14 +53,14 @@ GEM
metaclass (~> 0.0.1)
multi_json (1.3.4)
rake (0.9.2.2)
- rspec (2.9.0)
- rspec-core (~> 2.9.0)
- rspec-expectations (~> 2.9.0)
- rspec-mocks (~> 2.9.0)
- rspec-core (2.9.0)
- rspec-expectations (2.9.1)
+ rspec (2.11.0)
+ rspec-core (~> 2.11.0)
+ rspec-expectations (~> 2.11.0)
+ rspec-mocks (~> 2.11.0)
+ rspec-core (2.11.1)
+ rspec-expectations (2.11.2)
diff-lcs (~> 1.1.3)
- rspec-mocks (2.9.0)
+ rspec-mocks (2.11.1)
simplecov (0.6.2)
multi_json (~> 1.3)
simplecov-html (~> 0.5.3)
View
3  spec/acceptance/build_stubbed_spec.rb
@@ -131,7 +131,6 @@
end
it "doesn't allow setting created_at on an object that doesn't define it" do
- expect { build_stubbed(:thing_without_timestamp, :created_at => Time.now) }.to
- raise_error(NoMethodError, /created_at=/)
+ expect { build_stubbed(:thing_without_timestamp, :created_at => Time.now) }.to raise_error(NoMethodError, /created_at=/)
end
end
View
14 spec/support/matchers/declaration.rb
@@ -49,6 +49,13 @@ def with_options(options)
self
end
+ def failure_message
+ [
+ "expected declarations to include declaration of type #{@declaration_type}",
+ @options ? "with options #{options}" : nil
+ ].compact.join ' '
+ end
+
private
def expected_declaration
@@ -56,7 +63,12 @@ def expected_declaration
when :static then FactoryGirl::Declaration::Static.new(@name, @value, ignored?)
when :dynamic then FactoryGirl::Declaration::Dynamic.new(@name, ignored?, @value)
when :implicit then FactoryGirl::Declaration::Implicit.new(@name, @factory, ignored?)
- when :association then FactoryGirl::Declaration::Association.new(@name, options)
+ when :association
+ if @options
+ FactoryGirl::Declaration::Association.new(@name, options)
+ else
+ FactoryGirl::Declaration::Association.new(@name)
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.