Add a sample application to mutate in integration tests

This commit is contained in:
Markus Schirp 2012-08-09 20:04:03 +02:00
parent ad48c6fdbb
commit b087d4b38f
6 changed files with 44 additions and 0 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@
/Gemfile.lock
/tmp
/coverage
/test_app/.rbx

1
test_app/.rspec Normal file
View file

@ -0,0 +1 @@
--color

5
test_app/lib/test_app.rb Normal file
View file

@ -0,0 +1,5 @@
# Namespace for test application
module TestApp
end
require 'test_app/literal'

View file

@ -0,0 +1,20 @@
module TestApp
# Class for integration testing literal mutations
class Literal
def boolean
true
end
def string
'string'
end
def symbol
:symbol
end
def float
2.4
end
end
end

View file

@ -0,0 +1,8 @@
# encoding: utf-8
require 'rspec'
require 'test_app'
# require spec support files and shared behavior
Dir[File.expand_path('../{support,shared}/**/*.rb', __FILE__)].each { |f| require f }

View file

@ -0,0 +1,9 @@
require 'spec_helper'
describe TestApp::Literal,'#string' do
subject { object.string }
let(:object) { described_class.new }
it { should eql('string') }
end