If you want to do something like
Then the output should contain "\"bob saget\",1234123412"
This is the step definition you would probably write
Then /^the output should contain "(.*)$" do |text| Output.string.should be_include(text)
# encoding: utf-8 | |
# Copyright (C) 2011 by Murilo Pereira <[email protected]> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
If you want to do something like
Then the output should contain "\"bob saget\",1234123412"
This is the step definition you would probably write
Then /^the output should contain "(.*)$" do |text| Output.string.should be_include(text)
require 'test/unit' | |
require 'test/unit/ui/console/testrunner' | |
def scrubble(array) | |
array.dup.inject([]) do |scrubbled, element| | |
scrubbled << array.reject { |e| e == element } | |
end | |
end | |
class ScrubbleTest < Test::Unit::TestCase |