-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix capybara_lockstep_js not containing configuration (for use withou…
…t Rails)
- Loading branch information
1 parent
992964a
commit 4c4cd01
Showing
3 changed files
with
45 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
module Capybara | ||
module Lockstep | ||
describe Helper do | ||
|
||
subject do | ||
object = Object.new | ||
object.extend(Helper) | ||
object | ||
end | ||
|
||
describe '#capybara_lockstep_js' do | ||
|
||
it 'returns the CapybaraLockstep helper' do | ||
expect(subject.capybara_lockstep_js).to include('window.CapybaraLockstep =') | ||
end | ||
|
||
it 'configures a custom #wait_tasks setting' do | ||
expect(subject.capybara_lockstep_js).to_not include('CapybaraLockstep.waitTasks') | ||
|
||
Lockstep.wait_tasks = 99 | ||
|
||
expect(subject.capybara_lockstep_js).to include('CapybaraLockstep.waitTasks = 99') | ||
end | ||
|
||
it 'configures a custom #debug setting' do | ||
expect(subject.capybara_lockstep_js).to_not include('CapybaraLockstep.debug') | ||
|
||
Lockstep.debug = true | ||
|
||
expect(subject.capybara_lockstep_js).to include('CapybaraLockstep.debug = true') | ||
|
||
end | ||
|
||
end | ||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters