Sha256: 214f433e2537eeb8ea0c2bc77479a447912196feb424d3fe48bf16e9f5248050

Contents?: true

Size: 838 Bytes

Versions: 2

Compression:

Stored size: 838 Bytes

Contents

require 'spec_helper'
require 'mirage/client'



describe Mirage::TemplateConfiguration do
  TemplateConfiguration = Mirage::TemplateConfiguration
  it 'should have defaults' do
    configuration = TemplateConfiguration.new
    assert_defaults configuration
  end

  it 'should be reset' do
    configuration = TemplateConfiguration.new
    configuration.http_method = :post
    configuration.status = 202
    configuration.delay = 3
    configuration.default = true
    configuration.content_type = "text/xml"

    configuration.reset
    assert_defaults configuration
  end

  def assert_defaults configuration
    configuration.http_method.should == :get
    configuration.status.should == 200
    configuration.delay.should == 0
    configuration.default.should == false
    configuration.content_type.should == "text/plain"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mirage-3.0.0.alpha.2 spec/client/template_configuration_spec.rb
mirage-3.0.0.alpha.1 spec/client/template_configuration_spec.rb