This commit is contained in:
Nick Christensen
2012-04-27 10:18:01 -04:00
parent 1c12b428e7
commit e091a6bb1d
2 changed files with 36 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
require 'spec_helper'
require 'cmock_file_writer'
describe CMockFileWriter do
before do
@cmConfig = Object.new
#create instance of class under test
@subject = CMockFileWriter.new(@cmConfig)
end
describe 'initialize' do
it "have set up internal accessors correctly on init" do
result = @subject.config
result.should == @cmConfig
end
end
describe 'create_file' do
it "complain if a block was not specified when calling create" do
expect {@subject.create_file("text.txt")}.should raise_error
# should.be_false
end
end
end
+12
View File
@@ -0,0 +1,12 @@
require 'rubygems'
proj_root = File.expand_path(File.dirname(__FILE__) + '/../..')
# require proj_root + '/config/environment'
$LOAD_PATH << proj_root + '/lib'
require 'rspec'
require 'rr'
RSpec.configure do |config|
config.mock_with :rr
end