Sha256: 304a37d2cd9701285108c8a0063e1c6f631f3be00f08bd8cfe3a1e96de1d4e89
Contents?: true
Size: 1009 Bytes
Versions: 3
Compression:
Stored size: 1009 Bytes
Contents
require 'rubygems' require 'bacon' require 'mocha' $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'helpers' Bacon.summary_on_exit shared 'has standard setup' do before do CrossStub.setup(:file => $cache_file) end after do CrossStub.clear end end shared 'has current process setup' do before do @get_value = lambda do |klass_and_method_and_args| klass, method, *args = klass_and_method_and_args.split('.') args.empty? ? Object.const_get(klass).send(method) : Object.const_get(klass).send(method, *args) end end end shared 'has other process setup' do before do EchoServer.start unless ENV['ECHO_SERVER'] == 'false' @get_value = lambda do |klass_and_method_and_args| (value = EchoClient.get(klass_and_method_and_args)) !~ /^undefined method/ ? value : Object.we_just_wanna_trigger_a_no_method_error_with_this_very_long_and_weird_method! end end after do EchoServer.stop unless ENV['ECHO_SERVER'] == 'false' end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cross-stub-0.1.3.1 | spec/spec_helper.rb |
cross-stub-0.1.3 | spec/spec_helper.rb |
cross-stub-0.1.2 | spec/spec_helper.rb |