Use immutable support gem
This commit is contained in:
parent
b6de7fad91
commit
72996901bb
10 changed files with 11 additions and 13 deletions
2
.rspec
2
.rspec
|
@ -1,2 +1,2 @@
|
|||
--color
|
||||
--fail-fast
|
||||
#--fail-fast
|
||||
|
|
3
Gemfile
3
Gemfile
|
@ -2,8 +2,7 @@ source 'https://rubygems.org'
|
|||
|
||||
gemspec
|
||||
|
||||
# For Veritas::Immutable, will be extracted soon
|
||||
gem 'veritas', :git => 'https://github.com/dkubb/veritas'
|
||||
gem 'immutable', :git => 'https://github.com/mbj/immutable'
|
||||
|
||||
# Until there is a release with explicit sends to self fix
|
||||
gem 'to_source', :git => 'https://github.com/mbj/to_source'
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
# For Veritas::Immutable. will be extracted soon
|
||||
require 'veritas'
|
||||
|
||||
require 'immutable'
|
||||
require 'securerandom'
|
||||
require 'to_source'
|
||||
require 'ice_nine'
|
||||
|
@ -38,6 +36,7 @@ end
|
|||
require 'mutant/support/abstract'
|
||||
require 'mutant/random'
|
||||
require 'mutant/runner'
|
||||
require 'mutant/runner/rspec'
|
||||
require 'mutant/mutator'
|
||||
require 'mutant/mutator/registry'
|
||||
require 'mutant/mutator/literal'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Mutant
|
||||
# An abstract context where mutations can be appied to.
|
||||
class Context
|
||||
include Veritas::Immutable
|
||||
include Immutable
|
||||
extend Abstract
|
||||
|
||||
# Return root ast for mutated node
|
||||
|
|
|
@ -2,7 +2,7 @@ module Mutant
|
|||
class Context
|
||||
# Constant context for mutation (Class or Module)
|
||||
class Constant < Context
|
||||
include Veritas::Immutable
|
||||
include Immutable
|
||||
|
||||
private_class_method :new
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ module Mutant
|
|||
class Matcher
|
||||
# Matcher to find AST for method
|
||||
class Method < Matcher
|
||||
include Veritas::Immutable
|
||||
include Immutable
|
||||
|
||||
# Parse a method string into filter
|
||||
#
|
||||
|
|
|
@ -3,7 +3,7 @@ module Mutant
|
|||
class Method < Matcher
|
||||
# A classifier for input strings
|
||||
class Classifier
|
||||
extend Veritas::Immutable
|
||||
extend Immutable
|
||||
|
||||
TABLE = {
|
||||
'.' => Matcher::Method::Singleton,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Mutant
|
||||
# Generator for mutations
|
||||
class Mutator
|
||||
include Veritas::Immutable
|
||||
include Immutable
|
||||
extend Abstract
|
||||
|
||||
# Enumerate mutations on node
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Mutant
|
||||
# Abstract runner for tests
|
||||
class Runner
|
||||
include Veritas::Immutable
|
||||
include Immutable
|
||||
extend Abstract
|
||||
|
||||
# Run runner
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Mutant
|
||||
# Subject for mutation wraps AST to mutate with its Context
|
||||
class Subject
|
||||
include Veritas::Immutable, Enumerable
|
||||
include Immutable, Enumerable
|
||||
|
||||
# Return context
|
||||
#
|
||||
|
|
Loading…
Add table
Reference in a new issue