mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
Update dependency on RSpec
This commit is contained in:
parent
4311689d59
commit
330eed801b
3 changed files with 21 additions and 10 deletions
14
Gemfile.lock
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)
|
||||
|
|
|
@ -131,7 +131,6 @@ describe "defaulting `created_at`" do
|
|||
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
|
||||
|
|
|
@ -49,6 +49,13 @@ module DeclarationMatchers
|
|||
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 @@ module DeclarationMatchers
|
|||
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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue