Sha256: 4e0e314120b5a7420fb665359ddc5526894fa9b67a455f9c499dc518af931b42

Contents?: true

Size: 690 Bytes

Versions: 5

Compression:

Stored size: 690 Bytes

Contents

require File.dirname(__FILE__) + "/../lib/stories"
require File.dirname(__FILE__) + "/../lib/stories/runner"
require File.dirname(__FILE__) + "/../lib/stories/runner/pdf"

class Stories::Runner::PDF
  def render_header(pdf)
    pdf.text "My custom header", :size => 20, :style => :bold
    pdf.move_down 20
  end
end

# Use the story runner by default.
Test::Unit::AutoRunner::RUNNERS[:console] = Proc.new {|r| Stories::Runner::PDF }

class UserStoryTest < Test::Unit::TestCase
  story "As a user I want to create stories so I can test if they pass" do
    setup do
      @user = "valid user"
    end

    scenario "A valid user" do
      assert_equal "valid user", @user
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
citrusbyte-stories-0.0.5 test/pdf_test.rb
citrusbyte-stories-0.0.6 test/pdf_test.rb
citrusbyte-stories-0.0.7 test/pdf_test.rb
stories-0.0.5 test/pdf_test.rb
stories-0.0.7 test/pdf_test.rb