Sha256: 48a0f600cf144b178439ee4c4cf72898e2fd4d7ebe8fafd444355789aa2f0352

Contents?: true

Size: 718 Bytes

Versions: 32

Compression:

Stored size: 718 Bytes

Contents

shared_examples_for "component" do

    before :all do
        @name = self.class.metadata[:example_group][:description]
    end

    let(:name) { @name }
    let(:component_name) { name }
    let(:framework) { Cuboid::Framework.unsafe }
    let(:session) { framework.session }
    let(:http) { Cuboid::HTTP::Client }
    let(:options) { Cuboid::Options }

    def self.use_https
        @use_https = true
    end

    def url
        @url ||= web_server_url_for( @use_https ? "#{name}_https" : name ) + '/'
    rescue
        raise "Could not find server for '#{name}' component."
    end

    def yaml_load( yaml )
        YAML.load yaml.gsub( '__URL__', url )
    end

    def run
        framework.run
    end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
cuboid-0.2.11 spec/support/shared/component.rb
cuboid-0.2.10 spec/support/shared/component.rb
cuboid-0.2.9 spec/support/shared/component.rb
cuboid-0.2.8 spec/support/shared/component.rb
cuboid-0.2.7 spec/support/shared/component.rb
cuboid-0.2.6 spec/support/shared/component.rb
cuboid-0.2.5 spec/support/shared/component.rb
cuboid-0.2.4.2 spec/support/shared/component.rb
cuboid-0.2.4.1 spec/support/shared/component.rb
cuboid-0.2.4 spec/support/shared/component.rb
cuboid-0.2.3 spec/support/shared/component.rb
cuboid-0.2.2 spec/support/shared/component.rb
cuboid-0.2.1 spec/support/shared/component.rb
cuboid-0.2 spec/support/shared/component.rb
cuboid-0.1.9.1 spec/support/shared/component.rb
cuboid-0.1.9 spec/support/shared/component.rb
cuboid-0.1.8 spec/support/shared/component.rb
cuboid-0.1.7 spec/support/shared/component.rb
cuboid-0.1.6.1 spec/support/shared/component.rb
cuboid-0.1.6 spec/support/shared/component.rb