Module: Ctrlspecs

Defined in:
lib/ctrlspecs.rb,
lib/ctrlspecs/version.rb

Constant Summary collapse

VERSION =
"0.0.1"

Instance Method Summary collapse

Instance Method Details

#it_calls_service(service) ⇒ Object



18
19
20
# File 'lib/ctrlspecs.rb', line 18

def it_calls_service service
  it_behaves_like 'calls service', service
end

#it_flashes(hsh) ⇒ Object



14
15
16
# File 'lib/ctrlspecs.rb', line 14

def it_flashes hsh
  it_behaves_like 'flashes', hsh
end

#it_redirects_to(path) ⇒ Object



10
11
12
# File 'lib/ctrlspecs.rb', line 10

def it_redirects_to path
  it_behaves_like 'redirects to', path
end

#it_renders_template(tmpl_name) ⇒ Object



6
7
8
# File 'lib/ctrlspecs.rb', line 6

def it_renders_template tmpl_name
  it_behaves_like 'renders template', tmpl_name
end

#mock_save_record_failureObject



22
23
24
# File 'lib/ctrlspecs.rb', line 22

def mock_save_record_failure
  include_context 'mock save record failure'
end

#mock_service_returning_error(service, error) ⇒ Object



26
27
28
# File 'lib/ctrlspecs.rb', line 26

def mock_service_returning_error service, error
  include_context 'mock service returning error', service, error
end