Sha256: 9ea13a980ea9b19d353b5b5b129930698bd2807646163b68a9e5daf62ed91d25
Contents?: true
Size: 682 Bytes
Versions: 3
Compression:
Stored size: 682 Bytes
Contents
module Tapp module Turnip module Steps step 'I have the following code:' do |code| @code = code end step 'a file named :filename with:' do |filename, code| @filename, @code = filename, code end step 'Ruby it' do stdout = StringIO.new $stdout = stdout begin if @filename eval @code, binding, @filename, 1 else eval @code end ensure $stdout = STDOUT end @output = stdout.string.gsub(/\e\[0.*?m/, '').chop end step 'I should see:' do |output| @output.should == output end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tapp-1.5.1 | lib/tapp/turnip.rb |
tapp-1.5.0 | lib/tapp/turnip.rb |
tapp-1.5.0.rc | lib/tapp/turnip.rb |