Class: LearnTest::Strategies::None

Inherits:
LearnTest::Strategy show all
Defined in:
lib/learn_test/strategies/none.rb

Instance Attribute Summary

Attributes inherited from LearnTest::Strategy

#options, #runner

Instance Method Summary collapse

Methods inherited from LearnTest::Strategy

#argv, #check_dependencies, #cleanup, #configure, #die, #initialize, #learn_oauth_token, #output, #push_results?, #run_install, #user_id, #username

Constructor Details

This class inherits a constructor from LearnTest::Strategy

Instance Method Details

#detectObject



10
11
12
# File 'lib/learn_test/strategies/none.rb', line 10

def detect
  runner.files.include?('.canvas')
end

#resultsObject



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/learn_test/strategies/none.rb', line 18

def results
  {
    username: username,
    github_user_id: user_id,
    learn_oauth_token: learn_oauth_token,
    repo_name: runner.repo,
    build: {
      test_suite: [{
        framework: 'none',
        formatted_output: '',
        duration: nil
      }]
    },
    examples: 0,
    passing_count: 0,
    pending_count: 0,
    failure_count: 0,
    failure_descriptions: ''
  }
end

#runObject



14
15
16
# File 'lib/learn_test/strategies/none.rb', line 14

def run
  puts 'Your assignment was submitted. You can resubmit by running `learn test` again.'
end

#service_endpointObject



6
7
8
# File 'lib/learn_test/strategies/none.rb', line 6

def service_endpoint
  '/e/flatiron_none'
end