Sha256: d26693c71863e54f23b8ed0041abb9abc59a0d5a9da7edbb2647556c087f42d6

Contents?: true

Size: 1.06 KB

Versions: 4

Compression:

Stored size: 1.06 KB

Contents

require 'simplecov'
SimpleCov.start do
  add_filter 'test'
end

require 'coveralls'
if ENV['COVERALLS']
  Coveralls.wear!
end

require 'minitest/autorun'
require 'casting'

BlockTestPerson = Struct.new(:name)
BlockTestPerson.send(:include, Casting::Client)
BlockTestPerson.delegate_missing_methods

class TestPerson
  def name
    'name from TestPerson'
  end

  module Greeter
    def greet
      'hello'
    end

    protected

    def hey; end

    private

    def psst; end
  end

  module Verbose
    def verbose(arg1, arg2)
      [arg1, arg2].join(',')
    end
  end
end

class SubTestPerson < TestPerson
  def sub_method
    'sub'
  end
end

class Unrelated
  module More
    def unrelated
      'unrelated'
    end
  end
  include More

  def class_defined
    'oops!'
  end
end

module Deep
  def nested_deep; end
  protected
  def protected_nested_deep; end
  private
  def private_nested_deep; end
end

module Nested
  include Deep

  def nested; end
  protected
  def protected_nested; end
  private
  def private_nested; end
end

def test_person
  TestPerson.new
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
casting-0.7.1 test/test_helper.rb
casting-0.7.0 test/test_helper.rb
casting-0.6.3 test/test_helper.rb
casting-0.6.2 test/test_helper.rb