Skip to content

Instantly share code, notes, and snippets.

@biscuitvile
Created March 2, 2012 17:27
Show Gist options
  • Save biscuitvile/1959816 to your computer and use it in GitHub Desktop.
Save biscuitvile/1959816 to your computer and use it in GitHub Desktop.
More Descriptive RSPec output for Acceptance tests
require 'rspec/core/formatters/base_text_formatter'
module ExtraDoc
def example_passed(example)
example.description << " #{example.metadata[:extra_doc]}"
end
end
RSpec::Core::Formatters::BaseTextFormatter.send(:include, ExtraDoc)
describe "My Tests" do
it "Don't need to Cuke", :extra_doc => %q{
Given I want output with extra sauce
When I write acceptance tests all the live long day
Then I need to a 'lil trick for when I'm working on the railroad } do
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment