spec/cream/view/host_area_spec.rb in cream-0.7.3 vs spec/cream/view/host_area_spec.rb in cream-0.7.5

- old
+ new

@@ -8,11 +8,11 @@ @post = stub(:title => 'my post', :id => 1, :author => 'kristian' ) end describe '#for_localhost' do it "should display localhost guarded content for localhost browser agent" do - with_engine do |e, view| + view_engine do |e, view| view.stubs(:localhost?).returns true res = e.run_template do %{<%= for_localhost do %> hello @@ -22,11 +22,11 @@ res.should match /hello/ end end it "should NOT display localhost guarded content for NON-localhost browser agent" do - with_engine do |e, view| + view_engine do |e, view| view.stubs(:localhost?).returns false res = e.run_template do %{<%= for_localhost { 'hello' } %>} end @@ -35,21 +35,21 @@ end end describe '#for_public' do it "should display public content for public browser agent" do - with_engine do |e, view| + view_engine do |e, view| view.stubs(:publichost?).returns true res = e.run_template do %{<%= for_public { 'hello' } %>} end res.should match /hello/ end end it "should display public content for public browser agent" do - with_engine do |e, view| + view_engine do |e, view| view.stubs(:publichost?).returns false res = e.run_template do %{<%= for_public { 'hello' } %>} end \ No newline at end of file