spec/plugin/default_headers_spec.rb in roda-2.2.0 vs spec/plugin/default_headers_spec.rb in roda-2.3.0
- old
+ new
@@ -9,12 +9,12 @@
route do |r|
r.halt response.finish_with_body([])
end
end
- req[1].should == h
- req[1].should_not equal(h)
+ req[1].must_equal h
+ req[1].wont_be_same_as h
end
it "should not override existing default headers" do
h = {'Content-Type'=>'text/json', 'Foo'=>'bar'}
@@ -25,11 +25,11 @@
route do |r|
r.halt response.finish_with_body([])
end
end
- req[1].should == h
+ req[1].must_equal h
end
it "should allow modifying the default headers by reloading the plugin" do
app(:bare) do
plugin :default_headers, 'Content-Type' => 'text/json'
@@ -38,11 +38,11 @@
route do |r|
r.halt response.finish_with_body([])
end
end
- req[1].should == {'Content-Type'=>'text/json', 'Foo'=>'baz'}
+ req[1].must_equal('Content-Type'=>'text/json', 'Foo'=>'baz')
end
it "should have a default Content-Type header" do
h = {'Foo'=>'bar'}
@@ -52,11 +52,11 @@
route do |r|
r.halt response.finish_with_body([])
end
end
- req[1].should == {'Content-Type'=>'text/html', 'Foo'=>'bar'}
+ req[1].must_equal('Content-Type'=>'text/html', 'Foo'=>'bar')
end
it "should work correctly in subclasses" do
h = {'Content-Type'=>'text/json', 'Foo'=>'bar'}
@@ -68,8 +68,8 @@
end
end
@app = Class.new(@app)
- req[1].should == h
+ req[1].must_equal h
end
end