BasicObject
# File lib/ramaze/spec/bacon.rb, line 14 def spec_precondition(name) yield rescue LoadError => ex puts "Spec require: %p failed: %p" % [name, ex.message] exit 0 rescue Exception => ex puts "Spec precondition: %p failed: %p" % [name, ex.message] exit 0 end
# File lib/ramaze/spec/bacon.rb, line 7 def spec_requires(*libs) spec_precondition 'require' do libs.each { |lib| require(lib) } end end
# File lib/ramaze/spec/helper/template_examples.rb, line 7 def spec_template(spec_engine) it 'works on /' do get('/').body.strip. should =~ %{<a href\s*=\s*"/">Home</a>\s+\|\s+<a href\s*=\s*"/internal">internal</a>\s+\|\s+<a href\s*=\s*"/external">external</a>} end ]/internal /external].each do |url| it "works on #{url}" do html = get(url).body html.should.not == nil html.should =~ %{<title>Template::#{spec_engine} (internal|external)</title>} html.should =~ %{<h1>The (internal|external) Template for #{spec_engine}</h1>} end end end
Generated with the Darkfish Rdoc Generator 2.