spec/container_spec.rb in watir-webdriver-0.6.4 vs spec/container_spec.rb in watir-webdriver-0.6.5
- old
+ new
@@ -9,32 +9,26 @@
extract_selector(*args)
end
end
it "converts 2-arg selector into a hash" do
- @container.public_extract_selector([:how, 'what']).
- should == { :how => 'what' }
+ expect(@container.public_extract_selector([:how, 'what'])).to eq Hash[:how => 'what']
end
it "returns the hash given" do
- @container.public_extract_selector([:how => "what"]).
- should == { :how => "what" }
+ expect(@container.public_extract_selector([:how => "what"])).to eq Hash[:how => "what"]
end
it "returns an empty hash if given no args" do
- @container.public_extract_selector([]).should == {}
+ expect(@container.public_extract_selector([])).to eq Hash[]
end
it "raises ArgumentError if given 1 arg which is not a Hash" do
- lambda {
- @container.public_extract_selector([:how])
- }.should raise_error(ArgumentError)
+ expect {@container.public_extract_selector([:how])}.to raise_error(ArgumentError)
end
it "raises ArgumentError if given > 2 args" do
- lambda {
- @container.public_extract_selector([:how, 'what', 'value'])
- }.should raise_error(ArgumentError)
+ expect {@container.public_extract_selector([:how, 'what', 'value'])}.to raise_error(ArgumentError)
end
end
end