Class: CucumberMonitorController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/cucumber_monitor_controller.rb

Instance Method Summary collapse

Instance Method Details

#feature_runnerObject



19
20
21
22
23
24
25
# File 'app/controllers/cucumber_monitor_controller.rb', line 19

def feature_runner
  respond_to do |format|
    format.js do
      @json_feature_result = CucumberMonitor::FeatureRunner.run_and_return_json(name: params[:name])
    end
  end
end

#featuresObject



5
6
7
# File 'app/controllers/cucumber_monitor_controller.rb', line 5

def features
  @features = CucumberMonitor.new.features
end

#searchObject



13
14
15
16
17
# File 'app/controllers/cucumber_monitor_controller.rb', line 13

def search
  features = CucumberMonitor.new.features.where(name: params[:criteria])
  @features_search_results = features.kind_of?(Array) ? features : [features]
  @steps_search_results = CucumberMonitor.new.search(params[:criteria])
end

#show_featureObject



9
10
11
# File 'app/controllers/cucumber_monitor_controller.rb', line 9

def show_feature
  @feature = CucumberMonitor.new.features.where(name: params[:name])
end