Skip to content

Commit

Permalink
fix deprecations (though should really move to rspec 3)
Browse files Browse the repository at this point in the history
  • Loading branch information
ronen committed Feb 6, 2015
1 parent 4c1b0c1 commit 40b9c80
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/key_struct_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
end

it "initializer accepts all key args" do
expect { @klass.new(:a => 1, :b => 2, :c => 3) }.should_not raise_error
expect { @klass.new(:a => 1, :b => 2, :c => 3) }.not_to raise_error
end

it "initializer accepts some key args" do
expect { @klass.new(:a => 1) }.should_not raise_error
expect { @klass.new(:a => 1) }.not_to raise_error
end

it "initializer accepts no args" do
expect { @klass.new }.should_not raise_error
expect { @klass.new }.not_to raise_error
end

it "initializer raises error for invalid args" do
expect { @klass.new(:d => 4) }.should raise_error
expect { @klass.new(:d => 4) }.to raise_error
end

it "getters returns initial/default argument values" do
Expand Down Expand Up @@ -80,7 +80,7 @@ class Inherited < KeyStruct.send(method, :p, :q, :r => 4)

context "definition" do
it "can handle a default that's an array" do
expect { KeyStruct.send(method, :a => []) }.should_not raise_error
expect { KeyStruct.send(method, :a => []) }.not_to raise_error
end

it "reuses existing anonymous class definition" do
Expand Down

0 comments on commit 40b9c80

Please sign in to comment.