[rspec-users] Testing my scripts?

Sebastian W. lists at ruby-forum.com
Wed Mar 4 12:46:23 EST 2009


Hi David,
I think I see what you're saying, but I admit I'm still a bit confused. 
Maybe I'm missing something here, but I can't think of how I would drive 
the scripts (even through Cucumber) without actually invoking them, thus 
kicking off processes that I don't want.

Real code to illustrate my thought process:

#test.rb
class Test
  def test
    true
  end
end

#test_spec.rb
describe Test
  it "should test"
    Test.new.test.should be(true)
  end
end

#my_script_using_test.rb
require 'test'

Test.new.test


Even if I invoke my "script" through Cucumber, it's still going to fire, 
no? I think perhaps I am just missing the point altogether. :)

Thank you,
Sebastian
-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list