Class: OmgPullRequest::TestRunner::RailsTestFast

Inherits:
Base
  • Object
show all
Defined in:
lib/omg_pull_request/test_runner/rails_test_fast.rb

Instance Attribute Summary

Attributes inherited from Base

#configuration, #github_wrapper, #pull_request, #runtime, #store, #success

Instance Method Summary collapse

Methods inherited from Base

#abbr_from_sha, #abbr_to_sha, #from_sha, #git_client, #initialize, #issue_number, #log, #logger, #lolcommits_client, #notifier, #prowl_client, #request_sha, #run, #runtime_minutes, #runtime_seconds, #success?, #to_sha

Methods included from Configuration::Helpers

#delegate_config_to

Constructor Details

This class inherits a constructor from OmgPullRequest::TestRunner::Base

Instance Method Details

#execute_testsObject



9
10
11
# File 'lib/omg_pull_request/test_runner/rails_test_fast.rb', line 9

def execute_tests
  return execute!("cd #{local_repo} && bundle exec rake test:fast:prepare test:fast")
end

#setupObject



4
5
6
7
# File 'lib/omg_pull_request/test_runner/rails_test_fast.rb', line 4

def setup
  execute!("cd #{local_repo} && cp #{database_yml} config/database.yml && bundle")
  execute!("cd #{local_repo} && bundle exec rake db:drop:all && rake db:create:all && bundle exec rake db:schema:load")
end

#teardownObject



13
14
15
# File 'lib/omg_pull_request/test_runner/rails_test_fast.rb', line 13

def teardown
  execute!("rm #{local_repo}/log/test.log")
end