Sha256: 4fa9008db422d87cd75d2accf24af358170bff635e5d44ec0f55fd878e72d40a

Contents?: true

Size: 469 Bytes

Versions: 12

Compression:

Stored size: 469 Bytes

Contents

class TestResourceBase < Test::Unit::TestCase
  def setup
    stub(Yao::Resources::Base).get { Yao::Resources::Base.new({"id" => "foor", "name" => "bar"}) }
  end

  def test_friendly_attributes
    base = Yao::Resources::Base.new({"id" => "foor"})
    base.class.friendly_attributes(:name)
    assert_equal(base.name, "bar")

    base = Yao::Resources::Base.new({"name" => "bar"})
    base.class.friendly_attributes(:name)
    assert_equal(base.name, "bar")
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
yao-0.7.0 test/yao/resources/test_base.rb
yao-0.6.3 test/yao/resources/test_base.rb
yao-0.6.2 test/yao/resources/test_base.rb
yao-0.6.1 test/yao/resources/test_base.rb
yao-0.6.0 test/yao/resources/test_base.rb
yao-0.5.0 test/yao/resources/test_base.rb
yao-0.4.3 test/yao/resources/test_base.rb
yao-0.4.2 test/yao/resources/test_base.rb
yao-0.4.1 test/yao/resources/test_base.rb
yao-0.4.0 test/yao/resources/test_base.rb
yao-0.3.8 test/yao/resources/test_base.rb
yao-0.3.7 test/yao/resources/test_base.rb