mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-08-01 16:57:48 +00:00
initial
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user