Sha256: c21520ca5928f7328c606038a7aafa06f8cf6edf18bbea56b9ab29ed54d07a23

Contents?: true

Size: 547 Bytes

Versions: 11

Compression:

Stored size: 547 Bytes

Contents

require File.join(File.dirname(__FILE__), "..", "test_helper.rb")

describe "Relevance::Tarantula" do
  include Relevance::Tarantula
  attr_accessor :verbose
  
  it "writes to stdout if verbose" do
    self.verbose = true
    expects(:puts).with("foo")
    log("foo")
  end

  it "swallows output if !verbose" do
    self.verbose = false
    expects(:puts).never
    log("foo")
  end
  
  it "puts RAILS_ROOT behind a method call" do
    lambda{rails_root}.should.raise(NameError).message.should == "uninitialized constant RAILS_ROOT"
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
relevance-tarantula-0.0.1 test/relevance/tarantula_test.rb
relevance-tarantula-0.0.2 test/relevance/tarantula_test.rb
relevance-tarantula-0.0.3 test/relevance/tarantula_test.rb
relevance-tarantula-0.0.5 test/relevance/tarantula_test.rb
relevance-tarantula-0.0.6 test/relevance/tarantula_test.rb
relevance-tarantula-0.0.7.1 test/relevance/tarantula_test.rb
relevance-tarantula-0.0.7 test/relevance/tarantula_test.rb
relevance-tarantula-0.0.8.0 test/relevance/tarantula_test.rb
relevance-tarantula-0.0.8.1 test/relevance/tarantula_test.rb
tarantula-0.0.8.1 test/relevance/tarantula_test.rb
tarantula-0.0.5 test/relevance/tarantula_test.rb