Skip to content

Instantly share code, notes, and snippets.

@itsbth
Created January 18, 2012 20:17
Show Gist options
  • Select an option

  • Save itsbth/1635289 to your computer and use it in GitHub Desktop.

Select an option

Save itsbth/1635289 to your computer and use it in GitHub Desktop.
Uploaded by UploadToGist for Sublime Text 2
describe DupesController, js: true do
def login
visit "/auth/steam"
end
context "#new" do
it "should show a preview" do
login
visit new_dupe_path
within "#new_dupe" do
fill_in 'dupe_description', with: <<-TEXT
### Hello, World!
This is some **bold** text and *italic* text.
[A link](http://google.com)
TEXT
end
find("#md_preview").text.should == "Hello, World!\nThis is some bold text and italic text.\nA link"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment