spec/at_spec.rb in at-0.1.1 vs spec/at_spec.rb in at-0.1.2

- old
+ new

@@ -1,7 +1,25 @@ require 'spec_helper' +class Configuration + attr_reader :configuration + + def initialize + @configuration = "default" + end +end + +describe Configuration do + describe "#configuration" do + it "should return the @configuration instance variable" do + subject.configuration.should == "default" + subject.at.configuration = "the result" + subject.configuration.should == "the result" + end + end +end + class User def initialize(first_name=nil, last_name=nil) @first_name, @last_name = first_name, last_name end @@ -19,11 +37,9 @@ subject.at.last_name.should == "Doe" end end describe "#full_name" do - subject { User.new } - it "should correctly output the full name" do subject.at.first_name = "John" subject.at.last_name = "Doe" subject.full_name.should == "John Doe"