Top Level Namespace

Defined Under Namespace

Modules: CucumberValueParser, Leap Classes: Sniff

Instance Method Summary collapse

Methods included from CucumberValueParser

#coerce_value, #compare_values, #equality?

Instance Method Details

#bless_characteristics(characteristics) ⇒ Object



4
5
6
7
8
9
# File 'lib/test_support/cucumber/step_definitions/committee_steps.rb', line 4

def bless_characteristics(characteristics)
  characteristics.inject({}) do |memo, (k,v)|
    memo[k] = Charisma::Curator::Curation.new v, @activity.characterization[k]
    memo
  end
end

#run(cmd) ⇒ Object


Convenience Methods




9
10
11
12
13
# File 'lib/sniff/watcher.rb', line 9

def run(cmd)
  system 'clear'
  puts(cmd)
  system cmd
end

#run_all_cukesObject



33
34
35
36
37
# File 'lib/sniff/watcher.rb', line 33

def run_all_cukes
  unless Dir['features/*.feature'].empty?
    run "bundle exec cucumber features"
  end
end

#run_all_specsObject



20
21
22
23
24
# File 'lib/sniff/watcher.rb', line 20

def run_all_specs
  unless Dir['spec/**/*_spec.rb'].empty?
    run "bundle exec rspec spec"
  end
end

#run_all_testsObject



15
16
17
18
# File 'lib/sniff/watcher.rb', line 15

def run_all_tests
  run_all_specs if File.exist? 'spec'
  run_all_cukes if File.exist? 'features'
end

#run_single_cuke(scenario_path) ⇒ Object



39
40
41
# File 'lib/sniff/watcher.rb', line 39

def run_single_cuke scenario_path
  run "bundle exec cucumber #{scenario_path}"
end

#run_single_spec(*spec) ⇒ Object



26
27
28
29
30
31
# File 'lib/sniff/watcher.rb', line 26

def run_single_spec *spec
  unless Dir['spec/**/*_spec.rb'].empty?
    spec = spec.join(' ')
    run "bundle exec rspec #{spec}"
  end
end