Skip to content

Commit

Permalink
bumped rspec version and fixed corresponding errors re. positional args
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Evans committed Sep 2, 2024
1 parent 14f1984 commit 0171800
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dragonfly.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency("addressable", "~> 2.3")

# Development dependencies
spec.add_development_dependency("rspec", "~> 2.5")
spec.add_development_dependency("rspec", "~> 3.0")
spec.add_development_dependency("webmock")
spec.add_development_dependency("activemodel")
if RUBY_PLATFORM == "java"
Expand Down
2 changes: 1 addition & 1 deletion spec/dragonfly/app_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
}.should raise_error(NotImplementedError)
end
it "should correctly call it if the datastore provides it" do
@app.datastore.should_receive(:url_for).with('some_uid', :some => :opts).and_return 'http://egg.head'
@app.datastore.should_receive(:url_for).with('some_uid', {:some => :opts}).and_return 'http://egg.head'
@app.remote_url_for('some_uid', :some => :opts).should == 'http://egg.head'
end
end
Expand Down
8 changes: 4 additions & 4 deletions spec/dragonfly/configurable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def colour(colour)
configurer = Dragonfly::Configurable::Configurer.new do
meth :jobby, :nobby
end
obj.should_receive(:jobby).with('beans', :make => 5)
obj.should_receive(:jobby).with('beans', {:make => 5})
obj.should_receive(:nobby).with(['nuts'])
configurer.configure(obj) do
jobby 'beans', :make => 5
Expand All @@ -79,7 +79,7 @@ def colour(colour)
end
egg = double('egg')
obj.should_receive(:egg).and_return(egg)
egg.should_receive(:jobby).with('beans', :make => 5)
egg.should_receive(:jobby).with('beans', {:make => 5})
configurer.configure(obj) do
jobby 'beans', :make => 5
end
Expand All @@ -93,15 +93,15 @@ def colour(colour)

it "provides 'plugin' for using plugins" do
pluggy = double('plugin')
pluggy.should_receive(:call).with(obj, :a, 'few' => ['args'])
pluggy.should_receive(:call).with(obj, :a, {'few' => ['args']})
configurer.configure(obj) do
plugin pluggy, :a, 'few' => ['args']
end
end

it "allows using 'plugin' with symbols" do
pluggy = double('plugin')
pluggy.should_receive(:call).with(obj, :a, 'few' => ['args'])
pluggy.should_receive(:call).with(obj, :a, {'few' => ['args']})
configurer.register_plugin(:pluggy){ pluggy }
configurer.configure(obj) do
plugin :pluggy, :a, 'few' => ['args']
Expand Down
2 changes: 1 addition & 1 deletion spec/dragonfly/content_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def obj.original_filename; 'something.original'; end
end

it "allows passing options" do
app.datastore.should_receive(:write).with(content, :hello => 'there')
app.datastore.should_receive(:write).with(content, {:hello => 'there'})
content.store(:hello => 'there')
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/dragonfly/model/model_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@
describe "remote_url" do
it "should give the remote url if the uid is set" do
@item.preview_image_uid = 'some/uid'
@app.should_receive(:remote_url_for).with('some/uid', :some => 'param').and_return('http://egg.nog')
@app.should_receive(:remote_url_for).with('some/uid', {:some => 'param'}).and_return('http://egg.nog')
@item.preview_image.remote_url(:some => 'param').should == 'http://egg.nog'
end
it "should return nil if the content is not yet saved" do
Expand Down

0 comments on commit 0171800

Please sign in to comment.