Skip to content

Instantly share code, notes, and snippets.

@itsbth
Created February 6, 2012 22:30
Show Gist options
  • Select an option

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

Select an option

Save itsbth/1755463 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
# TODO: Check HTML
find("#md_preview").text.sub(/\s+/, ' ').should == "Hello, World! This is some bold text and italic text. A link"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment