spec/plugin/not_found_spec.rb in roda-2.2.0 vs spec/plugin/not_found_spec.rb in roda-2.3.0

- old
+ new

@@ -14,14 +14,14 @@ "found" end end end - body.should == 'not found' - status.should == 404 - body("/a").should == 'found' - status("/a").should == 200 + body.must_equal 'not found' + status.must_equal 404 + body("/a").must_equal 'found' + status("/a").must_equal 200 end it "allows overriding status inside not_found" do app(:bare) do plugin :not_found @@ -33,11 +33,11 @@ route do |r| end end - status.should == 403 + status.must_equal 403 end it "calculates correct Content-Length" do app(:bare) do plugin :not_found do @@ -45,11 +45,11 @@ end route{} end - header('Content-Length').should == "1" + header('Content-Length').must_equal "1" end it "clears existing headers" do app(:bare) do plugin :not_found do || @@ -61,23 +61,23 @@ response['Foo'] = 'bar' nil end end - header('Content-Type').should == 'text/html' - header('Foo').should == nil + header('Content-Type').must_equal 'text/html' + header('Foo').must_equal nil end it "does not modify behavior if not_found is not called" do app(:not_found) do |r| r.on "a" do "found" end end - body.should == '' - body("/a").should == 'found' + body.must_equal '' + body("/a").must_equal 'found' end it "can set not_found via the plugin block" do app(:bare) do plugin :not_found do @@ -89,12 +89,12 @@ "found" end end end - body.should == 'not found' - body("/a").should == 'found' + body.must_equal 'not found' + body("/a").must_equal 'found' end it "does not modify behavior if body is not an array" do app(:bare) do plugin :not_found do @@ -106,11 +106,11 @@ route do |r| r.halt [404, {}, o] end end - body.should == '' + body.must_equal '' end it "does not modify behavior if body is not an empty array" do app(:bare) do plugin :not_found do @@ -121,8 +121,8 @@ response.status = 404 response.write 'a' end end - body.should == 'a' + body.must_equal 'a' end end