Sha256: 8892f196685c38661ec5013c82489b9fa4261e0496acbf90a4506b67f33d2cd3

Contents?: true

Size: 743 Bytes

Versions: 5

Compression:

Stored size: 743 Bytes

Contents

require "test_helper"

class BaseTest < Test::Unit::TestCase
  should "store raw data from plist at initialization" do
    base = AppStore::Dummy.new :plist => "plist instance"
    assert_equal "plist instance", base.raw
  end
  
  should "call custom_init_from_plist with plist given at initialization if custom_init_from_plist is defined" do
    # Define a custom_init_from_plist function which do something testable
    class AppStore::Dummy
      attr_reader :plist_stored_via_custom
      
      def custom_init_from_plist(plist)
        @plist_stored_via_custom = plist
      end
    end
    
    dummy = AppStore::Dummy.new :plist => "plist object"
    
    assert_equal "plist object", dummy.plist_stored_via_custom
      
  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
app_store-0.1.2 test/base_test.rb
app_store-0.1.0 test/base_test.rb
app_store-0.0.4 test/base_test.rb
app_store-0.0.3 test/base_test.rb
app_store-0.0.1 test/base_test.rb