This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe "posts/show.html.erb" do | |
before(:each) do | |
@post = assign(:post, stub_model(Post,:id=>1,:title => "Test",:description=>'Want to contribute Engines')) | |
end | |
it "displays the post title with description" do | |
render | |
rendered.should contain("Test") | |
rendered.should contain("Want to contribute Engines") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe "posts/new.html.erb" do | |
before(:each) do | |
@post = assign(:post, stub_model(Post)).as_new_record.as_null_object | |
end | |
it "renders the form partial" do | |
render | |
rendered.should have_selector('form',:method => "post",:action => posts_path) do |form| | |
form.should have_selector('label',:for=>'post_title',:content=>'Title') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style type="text/css"> | |
@media screen and (-webkit-min-device-pixel-ratio:0) { | |
.myClass { background-color: #FF0000; } | |
#myId{color:#444} | |
body:nth-of-type(1) .chrome{border:1px solid red} | |
} | |
</style> | |
</head> |
NewerOlder