Sha256: 80549fe70e708259541c5b375c2f1209150530bcd3943ebfb0f9890fb9bf694c

Contents?: true

Size: 762 Bytes

Versions: 39

Compression:

Stored size: 762 Bytes

Contents

shared_examples_for PublishMyData::AllFeatures do
  describe '#deprecated?' do
    it 'should be false' do
      resource.deprecated?.should be_false
    end

    context 'when the dataset has been deprecated' do
      before { resource.rdf_type = [resource.rdf_type, resource.class.get_deprecated_rdf_type] }

      it 'should be true' do
        resource.deprecated?.should be_true
      end
    end
  end

  describe '#in_domain?' do
    it 'should return true if the resource URI is in the given domain' do
      host = URI(resource.uri).host
      resource.in_domain?(host).should be_true
    end

    it 'should return false if the resource URI is not in the given domain' do
      resource.in_domain?('http://google.com').should be_false
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
publish_my_data-1.3.25 spec/support/all_features.rb
publish_my_data-1.3.24 spec/support/all_features.rb
publish_my_data-1.3.23 spec/support/all_features.rb
publish_my_data-1.3.22 spec/support/all_features.rb
publish_my_data-1.3.21 spec/support/all_features.rb
publish_my_data-1.3.20 spec/support/all_features.rb
publish_my_data-1.3.19 spec/support/all_features.rb
publish_my_data-1.3.18 spec/support/all_features.rb
publish_my_data-1.3.17 spec/support/all_features.rb
publish_my_data-1.3.16 spec/support/all_features.rb
publish_my_data-1.3.15 spec/support/all_features.rb
publish_my_data-1.3.14 spec/support/all_features.rb
publish_my_data-1.3.13 spec/support/all_features.rb
publish_my_data-1.3.12 spec/support/all_features.rb
publish_my_data-1.3.11 spec/support/all_features.rb
publish_my_data-1.3.10 spec/support/all_features.rb
publish_my_data-1.3.9 spec/support/all_features.rb
publish_my_data-1.3.8 spec/support/all_features.rb
publish_my_data-1.3.7 spec/support/all_features.rb
publish_my_data-1.3.6 spec/support/all_features.rb