Module: Mockjax

Defined in:
lib/mockjax.rb,
lib/mockjax/rails.rb,
lib/mockjax/version.rb

Defined Under Namespace

Modules: Helpers, Rails

Constant Summary collapse

VERSION =
"0.0.3"

Class Method Summary collapse

Class Method Details

.cleanupObject



19
20
21
# File 'lib/mockjax.rb', line 19

def cleanup
  @mocks = []
end

.mock(options) ⇒ Object



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

def mock(options)
  @mocks ||= []
  @mocks << options
end

.mocksObject



15
16
17
# File 'lib/mockjax.rb', line 15

def mocks
  @mocks || []
end

.path_to_jsObject



27
28
29
# File 'lib/mockjax.rb', line 27

def path_to_js
  @path_to_js || (defined?(::Rails) ? '/assets/jquery.mockjax.js' : 'https://raw.github.com/appendto/jquery-mockjax/master/jquery.mockjax.js')
end

.path_to_js=(path) ⇒ Object



23
24
25
# File 'lib/mockjax.rb', line 23

def path_to_js=(path)
  @path_to_js = path
end