Add a sample application to mutate in integration tests
This commit is contained in:
parent
ad48c6fdbb
commit
b087d4b38f
6 changed files with 44 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@
|
|||
/Gemfile.lock
|
||||
/tmp
|
||||
/coverage
|
||||
/test_app/.rbx
|
||||
|
|
1
test_app/.rspec
Normal file
1
test_app/.rspec
Normal file
|
@ -0,0 +1 @@
|
|||
--color
|
5
test_app/lib/test_app.rb
Normal file
5
test_app/lib/test_app.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Namespace for test application
|
||||
module TestApp
|
||||
end
|
||||
|
||||
require 'test_app/literal'
|
20
test_app/lib/test_app/literal.rb
Normal file
20
test_app/lib/test_app/literal.rb
Normal 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
|
8
test_app/spec/spec_helper.rb
Normal file
8
test_app/spec/spec_helper.rb
Normal 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 }
|
9
test_app/spec/unit/test_app/literal/string_spec.rb
Normal file
9
test_app/spec/unit/test_app/literal/string_spec.rb
Normal 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
|
Loading…
Reference in a new issue