Skip to content

Commit

Permalink
RSpec.shared_examples for CWM: Page, PushButton, RadioButtons, RichText.
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidner committed Jun 19, 2017
1 parent 15350bb commit 48eba86
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion library/cwm/src/lib/cwm/rspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,15 @@
include_examples "CWM::CustomWidget"
end

RSpec.shared_examples "CWM::Tab" do
RSpec.shared_examples "CWM::Page" do
include_examples "CWM::CustomWidget"
end

# Tab is an alias for Page
RSpec.shared_examples "CWM::Tab" do
include_examples "CWM::Page"
end

RSpec.shared_examples "CWM::ItemsSelection" do
describe "#items" do
it "produces an array of pairs of strings" do
Expand All @@ -79,6 +84,23 @@
include_examples "CWM::ItemsSelection"
end

RSpec.shared_examples "CWM::PushButton" do
include_examples "CWM::AbstractWidget"
end

RSpec.shared_examples "CWM::RadioButtons" do
include_examples "CWM::AbstractWidget"
include_examples "CWM::ItemsSelection"
end

RSpec.shared_examples "CWM::ValueBasedWidget" do
end

RSpec.shared_examples "CWM::RichText" do
include_examples "CWM::AbstractWidget"
include_examples "CWM::ValueBasedWidget"
end

RSpec.shared_examples "CWM::Table" do
include_examples "CWM::AbstractWidget"

Expand Down

0 comments on commit 48eba86

Please sign in to comment.