Sha256: 45831cc4aee937d6437f5d0aa84443249807cde4b56c00ff8067fcfad3c80d89

Contents?: true

Size: 770 Bytes

Versions: 25

Compression:

Stored size: 770 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

class TestClass
  include Configurable
end

describe "configurable" do
  before(:each) do
    @tc = TestClass.new
  end
  it "should set the name as frank" do
    @tc.configure({:name => "frank"})
    @tc.name.should == "frank"
  end
  it "should reset the name after it's been set" do
    @tc.configure({:name => "frank"})
    @tc.configure({:name => "timmy"})
    @tc.name.should == "timmy"
  end
  it "should be able to reconfigure itself" do
    @tc.configure(:name => "walter")
    @tc.reconfigure(:name => "dewey")
    @tc.name.should == "dewey"
  end
  it "should send an array if two arguments are given" do
    @tc.configure({:name => ["array", "ishere"]})
    @tc.name.should == ["array", "ishere"]
  end
end

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
auser-poolparty-0.2.45 spec/poolparty/modules/configurable_spec.rb
auser-poolparty-0.2.46 spec/poolparty/modules/configurable_spec.rb
auser-poolparty-0.2.47 spec/poolparty/modules/configurable_spec.rb
auser-poolparty-0.2.48 spec/poolparty/modules/configurable_spec.rb
auser-poolparty-0.2.49 spec/poolparty/modules/configurable_spec.rb
auser-poolparty-0.2.50 spec/poolparty/modules/configurable_spec.rb
auser-poolparty-0.2.51 spec/poolparty/modules/configurable_spec.rb
auser-poolparty-0.2.52 spec/poolparty/modules/configurable_spec.rb
auser-poolparty-0.2.53 spec/poolparty/modules/configurable_spec.rb
auser-poolparty-0.2.54 spec/poolparty/modules/configurable_spec.rb
auser-poolparty-0.2.55 spec/poolparty/modules/configurable_spec.rb
auser-poolparty-0.2.56 spec/poolparty/modules/configurable_spec.rb
auser-poolparty-0.2.57 spec/poolparty/modules/configurable_spec.rb
auser-poolparty-0.2.58 spec/poolparty/modules/configurable_spec.rb
auser-poolparty-0.2.59 spec/poolparty/modules/configurable_spec.rb
auser-poolparty-0.2.60 spec/poolparty/modules/configurable_spec.rb
auser-poolparty-0.2.61 spec/poolparty/modules/configurable_spec.rb
auser-poolparty-0.2.62 spec/poolparty/modules/configurable_spec.rb
auser-poolparty-0.2.63 spec/poolparty/modules/configurable_spec.rb
auser-poolparty-0.2.64 spec/poolparty/modules/configurable_spec.rb