-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No longer need to set up and pass in the stage variable, or manually set the type when the specs are in the controllers folder.
- Loading branch information
Showing
5 changed files
with
27 additions
and
18 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
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 @@ | ||
Dir.chdir('spec') { Dir['support/**/*.rb'].each { |file| require file } } |
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,17 @@ | ||
module Launchpad | ||
module RSpec | ||
# Remove the jrubyfx controller overrides and set the stage double. | ||
module Controller | ||
extend ::RSpec::SharedContext | ||
|
||
let(:stage) { double 'stage', on_shown: true, close: true } | ||
|
||
subject do | ||
described_class.allocate.tap do |controller| | ||
controller.instance_variable_set :@stage, stage | ||
controller.send :initialize | ||
end | ||
end | ||
end | ||
end | ||
end |