shoes-core 4.0.0.pre4 → 4.0.0.pre5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +4 -4
  2. data/Guardfile +5 -0
  3. data/bin/shoes +1 -1
  4. data/bin/shoes-stub +1 -1
  5. data/ext/install/Rakefile +15 -5
  6. data/ext/install/shoes.bat +1 -1
  7. data/lib/shoes/animation.rb +2 -2
  8. data/lib/shoes/arc.rb +1 -0
  9. data/lib/shoes/builtin_methods.rb +5 -18
  10. data/lib/shoes/button.rb +1 -5
  11. data/lib/shoes/check_button.rb +1 -5
  12. data/lib/shoes/color.rb +5 -274
  13. data/lib/shoes/color/dsl.rb +166 -0
  14. data/lib/shoes/color/dsl_helpers.rb +84 -0
  15. data/lib/shoes/color/hex_converter.rb +32 -0
  16. data/lib/shoes/common/background_element.rb +5 -0
  17. data/lib/shoes/common/hover.rb +87 -0
  18. data/lib/shoes/common/initialization.rb +21 -8
  19. data/lib/shoes/common/remove.rb +2 -0
  20. data/lib/shoes/common/state.rb +17 -3
  21. data/lib/shoes/common/style.rb +8 -0
  22. data/lib/shoes/configuration.rb +18 -15
  23. data/lib/shoes/core/version.rb +1 -1
  24. data/lib/shoes/dimension.rb +6 -19
  25. data/lib/shoes/dimensions.rb +8 -0
  26. data/lib/shoes/download.rb +5 -3
  27. data/lib/shoes/dsl.rb +3 -3
  28. data/lib/shoes/image.rb +1 -0
  29. data/lib/shoes/image_pattern.rb +1 -1
  30. data/lib/shoes/input_box.rb +2 -5
  31. data/lib/shoes/internal_app.rb +13 -2
  32. data/lib/shoes/line.rb +1 -0
  33. data/lib/shoes/link.rb +8 -0
  34. data/lib/shoes/list_box.rb +2 -5
  35. data/lib/shoes/mock/check.rb +3 -0
  36. data/lib/shoes/mock/image.rb +6 -0
  37. data/lib/shoes/mock/progress.rb +6 -0
  38. data/lib/shoes/mock/radio.rb +3 -0
  39. data/lib/shoes/mock/sound.rb +1 -1
  40. data/lib/shoes/oval.rb +1 -0
  41. data/lib/shoes/packager.rb +1 -1
  42. data/lib/shoes/rect.rb +1 -0
  43. data/lib/shoes/shape.rb +4 -0
  44. data/lib/shoes/slot.rb +75 -38
  45. data/lib/shoes/slot_contents.rb +4 -0
  46. data/lib/shoes/sound.rb +3 -2
  47. data/lib/shoes/star.rb +1 -0
  48. data/lib/shoes/text_block.rb +18 -2
  49. data/lib/shoes/text_block_dimensions.rb +19 -3
  50. data/lib/shoes/timer.rb +2 -2
  51. data/lib/shoes/ui/picker.rb +4 -4
  52. data/lib/shoes/version.rb +1 -1
  53. data/shoes-core.gemspec +1 -1
  54. data/spec/shoes/animation_spec.rb +2 -2
  55. data/spec/shoes/app_spec.rb +6 -17
  56. data/spec/shoes/arc_spec.rb +2 -1
  57. data/spec/shoes/background_spec.rb +2 -2
  58. data/spec/shoes/border_spec.rb +2 -2
  59. data/spec/shoes/builtin_methods_spec.rb +68 -56
  60. data/spec/shoes/button_spec.rb +3 -3
  61. data/spec/shoes/check_spec.rb +3 -2
  62. data/spec/shoes/color_spec.rb +9 -3
  63. data/spec/shoes/common/remove_spec.rb +0 -1
  64. data/spec/shoes/common/rotate_spec.rb +13 -0
  65. data/spec/shoes/common/style_spec.rb +12 -3
  66. data/spec/shoes/configuration_spec.rb +18 -3
  67. data/spec/shoes/constants_spec.rb +1 -0
  68. data/spec/shoes/dialog_spec.rb +1 -3
  69. data/spec/shoes/dimension_spec.rb +33 -24
  70. data/spec/shoes/dimensions_spec.rb +21 -31
  71. data/spec/shoes/download_spec.rb +14 -3
  72. data/spec/shoes/flow_spec.rb +6 -7
  73. data/spec/shoes/font_spec.rb +2 -3
  74. data/spec/shoes/framework_learning_spec.rb +1 -2
  75. data/spec/shoes/gradient_spec.rb +1 -2
  76. data/spec/shoes/helpers/fake_absolute_element.rb +30 -0
  77. data/spec/shoes/helpers/sample17_helper.rb +0 -1
  78. data/spec/shoes/image_spec.rb +2 -1
  79. data/spec/shoes/input_box_spec.rb +2 -2
  80. data/spec/shoes/integration_spec.rb +0 -1
  81. data/spec/shoes/internal_app_spec.rb +4 -5
  82. data/spec/shoes/keypress_spec.rb +1 -1
  83. data/spec/shoes/keyrelease_spec.rb +1 -2
  84. data/spec/shoes/line_spec.rb +3 -2
  85. data/spec/shoes/link_spec.rb +26 -6
  86. data/spec/shoes/list_box_spec.rb +2 -2
  87. data/spec/shoes/oval_spec.rb +2 -1
  88. data/spec/shoes/packager_spec.rb +1 -1
  89. data/spec/shoes/point_spec.rb +1 -1
  90. data/spec/shoes/progress_spec.rb +1 -1
  91. data/spec/shoes/radio_spec.rb +1 -1
  92. data/spec/shoes/rect_spec.rb +2 -1
  93. data/spec/shoes/renamed_delegate_spec.rb +0 -1
  94. data/spec/shoes/shape_spec.rb +1 -1
  95. data/spec/shoes/shared_examples/common_methods.rb +1 -1
  96. data/spec/shoes/shared_examples/dsl/animate.rb +1 -1
  97. data/spec/shoes/shared_examples/dsl/background.rb +2 -2
  98. data/spec/shoes/shared_examples/dsl/rgb.rb +4 -2
  99. data/spec/shoes/shared_examples/dsl/star.rb +0 -1
  100. data/spec/shoes/shared_examples/dsl/style.rb +1 -1
  101. data/spec/shoes/shared_examples/dsl/text_elements.rb +2 -2
  102. data/spec/shoes/shared_examples/dsl/video.rb +1 -1
  103. data/spec/shoes/shared_examples/dsl_app_context.rb +4 -1
  104. data/spec/shoes/shared_examples/hover.rb +78 -0
  105. data/spec/shoes/shared_examples/slot.rb +34 -4
  106. data/spec/shoes/shared_examples/state.rb +9 -2
  107. data/spec/shoes/shared_examples/style.rb +0 -5
  108. data/spec/shoes/slot_spec.rb +11 -38
  109. data/spec/shoes/sound_spec.rb +3 -2
  110. data/spec/shoes/span_spec.rb +2 -2
  111. data/spec/shoes/spec_helper.rb +1 -1
  112. data/spec/shoes/stack_spec.rb +6 -6
  113. data/spec/shoes/star_spec.rb +2 -1
  114. data/spec/shoes/text_block_dimensions_spec.rb +3 -4
  115. data/spec/shoes/text_block_spec.rb +16 -11
  116. data/spec/shoes/ui/picker_spec.rb +5 -6
  117. data/spec/shoes/url_spec.rb +1 -2
  118. data/spec/shoes/widget_spec.rb +11 -3
  119. data/spec/shoes_spec.rb +1 -4
  120. data/spec/spec_helper.rb +2 -1
  121. metadata +16 -9
  122. data/bin/shoes-guard +0 -8
  123. data/lib/shoes/link_hover.rb +0 -5
  124. data/spec/shoes/shared_examples/hover_leave.rb +0 -11
data/lib/shoes/rect.rb CHANGED
@@ -4,6 +4,7 @@ class Shoes
4
4
  include Common::Fill
5
5
  include Common::Stroke
6
6
  include Common::Clickable
7
+ include Common::Hover
7
8
  include Common::Style
8
9
 
9
10
  style_with :angle, :art_styles, :curve, :common_styles, :dimensions
data/lib/shoes/shape.rb CHANGED
@@ -39,6 +39,10 @@ class Shoes
39
39
  @app.height
40
40
  end
41
41
 
42
+ def fixed_height?
43
+ false
44
+ end
45
+
42
46
  # Moves the shape
43
47
  #
44
48
  # @param [Integer] left The new left value
data/lib/shoes/slot.rb CHANGED
@@ -2,6 +2,7 @@ class Shoes
2
2
  class Slot
3
3
  include Common::UIElement
4
4
  include Common::Clickable
5
+ include Common::Hover
5
6
  include Common::Style
6
7
 
7
8
  # We need that offset because otherwise element overlap e.g. occupy
@@ -9,7 +10,7 @@ class Shoes
9
10
  # See #update_current_position
10
11
  NEXT_ELEMENT_OFFSET = 1
11
12
 
12
- attr_reader :parent, :dimensions, :gui, :contents, :blk, :hover_proc, :leave_proc
13
+ attr_reader :parent, :dimensions, :gui, :contents, :blk
13
14
 
14
15
  style_with :art_styles, :attach, :common_styles, :dimensions, :scroll
15
16
  STYLES = { scroll: false, fill: Shoes::COLORS[:black] }
@@ -28,14 +29,13 @@ class Shoes
28
29
  end
29
30
 
30
31
  def handle_block(blk)
32
+ @current_position = CurrentPosition.new element_left,
33
+ element_top,
34
+ element_top
31
35
  @blk = blk
32
36
  eval_block blk
33
37
  end
34
38
 
35
- def after_initialize(*_)
36
- contents_alignment
37
- end
38
-
39
39
  def set_default_dimension_values
40
40
  self.width ||= 1.0
41
41
  self.height ||= 0
@@ -63,6 +63,50 @@ class Shoes
63
63
 
64
64
  def add_child(element)
65
65
  contents.add_element element
66
+
67
+ if !element.hidden? && element.takes_up_space?
68
+ # Prepending would entail repositioning everyone after us, so just give
69
+ # it up and let contents_alignment save us the work.
70
+ if contents.prepending?
71
+ contents_alignment
72
+ else
73
+ original_height = self.height
74
+ @current_position = positioning(element, @current_position)
75
+
76
+ height_delta = slot_grew_by(original_height)
77
+ bump_parent_current_position(height_delta)
78
+ end
79
+ end
80
+ end
81
+
82
+ def slot_grew_by(original_height)
83
+ determine_slot_height
84
+ self.height - original_height
85
+ end
86
+
87
+ def bump_parent_current_position(height_delta)
88
+ return unless height_delta > 0
89
+ return unless parent.respond_to?(:bump_current_position)
90
+
91
+ parent.bump_current_position(self, height_delta)
92
+ end
93
+
94
+ # This method gets called when one of our child slots got larger, so we
95
+ # need to move our current position to accomodate.
96
+ def bump_current_position(growing_slot, height_delta)
97
+ # If intermediate child changed, give up and hit it with the big hammer
98
+ if any_sibling_slots_following?(growing_slot)
99
+ contents_alignment
100
+ else
101
+ @current_position.y += height_delta
102
+ @current_position.next_line_start += height_delta
103
+ end
104
+ end
105
+
106
+ def any_sibling_slots_following?(growing_slot)
107
+ next_sibling = contents.index(growing_slot) + 1
108
+ next_siblings = contents[next_sibling..-1]
109
+ next_siblings.any? { |e| e.is_a?(Slot) }
66
110
  end
67
111
 
68
112
  def remove_child(element)
@@ -84,28 +128,8 @@ class Shoes
84
128
  determine_slot_height
85
129
  end
86
130
 
87
- def hovered?
88
- @hovered
89
- end
90
-
91
- def hover(blk)
92
- @hover_proc = blk
93
- @app.add_mouse_hover_control self
94
- end
95
-
96
- def leave(blk)
97
- @leave_proc = blk
98
- @app.add_mouse_hover_control self
99
- end
100
-
101
- def mouse_hovered
102
- @hovered = true
103
- @hover_proc.call(self) if @hover_proc
104
- end
105
-
106
- def mouse_left
107
- @hovered = false
108
- @leave_proc.call(self) if @leave_proc
131
+ def add_mouse_hover_control
132
+ @app.add_mouse_hover_control(self)
109
133
  end
110
134
 
111
135
  def scroll_height
@@ -128,25 +152,36 @@ class Shoes
128
152
  "#<#{self.class}:0x#{hash.to_s(16)} @contents=#{@contents.inspect} and so much stuff literally breaks the memory limit. Look at it selectively.>"
129
153
  end
130
154
 
155
+ def fixed_height?
156
+ !!@fixed_height
157
+ end
158
+
159
+ def variable_height?
160
+ !@fixed_height
161
+ end
162
+
131
163
  protected
132
164
 
133
165
  CurrentPosition = Struct.new(:x, :y, :next_line_start)
134
166
 
135
167
  def position_contents
136
- current_position = CurrentPosition.new element_left,
168
+ @current_position = CurrentPosition.new element_left,
137
169
  element_top,
138
170
  element_top
139
171
 
140
172
  contents.each do |element|
141
173
  next if element.hidden?
142
- current_position = positioning(element, current_position)
174
+ @current_position = positioning(element, @current_position)
143
175
  end
144
- current_position
176
+ @current_position
145
177
  end
146
178
 
147
179
  def positioning(element, current_position)
148
- position_element element, current_position
149
- element.contents_alignment(current_position) if element.respond_to? :contents_alignment
180
+ if element.needs_positioning?
181
+ position_element element, current_position
182
+ element.contents_alignment(current_position) if element.respond_to? :contents_alignment
183
+ end
184
+
150
185
  if element.takes_up_space?
151
186
  update_current_position(current_position, element)
152
187
  else
@@ -244,7 +279,7 @@ class Shoes
244
279
 
245
280
  def determine_slot_height
246
281
  content_height = compute_content_height
247
- self.height = content_height if variable_height?
282
+ self.element_height = content_height if variable_height?
248
283
  content_height
249
284
  end
250
285
 
@@ -256,18 +291,17 @@ class Shoes
256
291
  max
257
292
 
258
293
  if max_bottom
259
- max_bottom - self.absolute_top + NEXT_ELEMENT_OFFSET
294
+ max_bottom - self.element_top + NEXT_ELEMENT_OFFSET
260
295
  else
261
296
  0
262
297
  end
263
298
  end
264
-
265
- def variable_height?
266
- !@fixed_height
267
- end
268
299
  end
269
300
 
270
301
  class Flow < Slot
302
+ # Included to generate the *Hover class
303
+ include Common::Hover
304
+
271
305
  def position_element(element, current_position)
272
306
  if fits_on_the_same_line?(element, current_position.x)
273
307
  position_in_current_line(element, current_position)
@@ -278,6 +312,9 @@ class Shoes
278
312
  end
279
313
 
280
314
  class Stack < Slot
315
+ # Included to generate the *Hover class
316
+ include Common::Hover
317
+
281
318
  def position_element(element, current_position)
282
319
  move_to_next_line(element, current_position)
283
320
  end
@@ -9,6 +9,10 @@ class Shoes
9
9
  super(@contents)
10
10
  end
11
11
 
12
+ def prepending?
13
+ @prepending
14
+ end
15
+
12
16
  def add_element(element)
13
17
  if @prepending
14
18
  prepend_element element
data/lib/shoes/sound.rb CHANGED
@@ -3,13 +3,14 @@ class Shoes
3
3
  include Common::Inspect
4
4
 
5
5
  def initialize(parent, filepath, _opts = {}, &_blk)
6
+ @app = parent
6
7
  @parent = parent
7
8
  @filepath = filepath
8
9
 
9
- @gui = Shoes.configuration.backend_for(self)
10
+ @gui = Shoes.backend_for(self)
10
11
  end
11
12
 
12
- attr_reader :gui, :filepath, :parent
13
+ attr_reader :app, :gui, :filepath, :parent
13
14
 
14
15
  def play
15
16
  @gui.play
data/lib/shoes/star.rb CHANGED
@@ -5,6 +5,7 @@ class Shoes
5
5
  include Common::Stroke
6
6
  include Common::Style
7
7
  include Common::Clickable
8
+ include Common::Hover
8
9
 
9
10
  style_with :angle, :art_styles, :common_styles, :dimensions, :inner, :outer, :points
10
11
  STYLES = { angle: 0, fill: Shoes::COLORS[:black] }
@@ -6,6 +6,7 @@ class Shoes
6
6
  include Common::UIElement
7
7
  include Common::Style
8
8
  include Common::Clickable
9
+ include Common::Hover
9
10
  include TextBlockDimensionsDelegations
10
11
 
11
12
  attr_reader :text, :contents, :text_styles
@@ -18,17 +19,27 @@ class Shoes
18
19
  @dimensions = TextBlockDimensions.new @parent, @style
19
20
  end
20
21
 
21
- def after_initialize(text)
22
+ def add_to_parent(text)
22
23
  handle_styles @style
23
24
 
24
- # Important to use accessor and do this after the backend exists!
25
+ # Important to use accessor and do this after the backend exists, but
26
+ # before we place ourselves in the parent container!
25
27
  self.text = Array(text)
28
+
29
+ super
26
30
  end
27
31
 
28
32
  def in_bounds?(*args)
29
33
  @gui.in_bounds?(*args)
30
34
  end
31
35
 
36
+ def remove
37
+ super
38
+ links.each do |link|
39
+ @app.remove_mouse_hover_control(link)
40
+ end
41
+ end
42
+
32
43
  def text=(*texts)
33
44
  replace(*texts[0])
34
45
  end
@@ -138,6 +149,11 @@ class Shoes
138
149
  clazz = Class.new(TextBlock) do
139
150
  const_set("STYLES", { font: DEFAULT_TEXTBLOCK_FONT, fill: nil }.merge(styles))
140
151
  end
152
+
141
153
  Shoes.const_set(name, clazz)
154
+
155
+ clazz.class_eval do
156
+ include Shoes::Common::Hover
157
+ end
142
158
  end
143
159
  end
@@ -29,9 +29,21 @@ class Shoes
29
29
  10
30
30
  end
31
31
 
32
- # This is the width the text block initially wants to try and fit into.
33
- def desired_width(containing = containing_width)
34
- parent.absolute_left + containing - absolute_left - margin_left - margin_right
32
+ # This is the width the text block initially wants to try to fit in.
33
+ #
34
+ # If an explicit containing width is provided, trust that most
35
+ # If we've gotten an explicit width, use that but check that we fit still
36
+ # Last but certainly not least, consult what's remaining in our parent.
37
+ def desired_width(containing = nil)
38
+ if containing
39
+ desired = parent.absolute_left + containing - absolute_left
40
+ elsif element_width
41
+ desired = [element_width, remaining_in_parent].min
42
+ else
43
+ desired = remaining_in_parent
44
+ end
45
+
46
+ desired - margin_left - margin_right
35
47
  end
36
48
 
37
49
  # If an explicit width's set, use that when asking how much space we need.
@@ -39,6 +51,10 @@ class Shoes
39
51
  def containing_width
40
52
  element_width || parent.element_width
41
53
  end
54
+
55
+ def remaining_in_parent
56
+ parent.absolute_left + parent.element_width - absolute_left
57
+ end
42
58
  end
43
59
 
44
60
  module TextBlockDimensionsDelegations
data/lib/shoes/timer.rb CHANGED
@@ -6,9 +6,9 @@ class Shoes
6
6
  @app = app
7
7
  @n = n
8
8
  @blk = @app.current_slot.create_bound_block(blk)
9
- @gui = Shoes.configuration.backend_for(self, @app.gui, @blk)
9
+ @gui = Shoes.backend_for(self, @blk)
10
10
  end
11
11
 
12
- attr_reader :n, :gui
12
+ attr_reader :app, :n, :gui
13
13
  end
14
14
  end
@@ -3,12 +3,12 @@ class Shoes
3
3
  # This class is used for interactively (if necessary) picking the Shoes
4
4
  # backend that the user will run their Shoes app with.
5
5
  class Picker
6
- def initialize(input=STDIN, output=STDOUT)
6
+ def initialize(input = STDIN, output = STDOUT)
7
7
  @input = input
8
8
  @output = output
9
9
  end
10
10
 
11
- def run(bin_dir, desired_backend=nil)
11
+ def run(bin_dir, desired_backend = nil)
12
12
  bundle
13
13
  generator_file = select_generator(desired_backend)
14
14
  write_backend(generator_file, bin_dir)
@@ -25,7 +25,7 @@ class Shoes
25
25
  require 'bundler/setup'
26
26
  end
27
27
 
28
- def select_generator(desired_backend=nil)
28
+ def select_generator(desired_backend = nil)
29
29
  candidates = find_candidates(desired_backend)
30
30
 
31
31
  if candidates.empty?
@@ -75,7 +75,7 @@ class Shoes
75
75
 
76
76
  def name_for_candidate(candidate)
77
77
  /.*lib\/shoes\/(.*)\/generate-backend.rb/.match(candidate)
78
- return "shoes-#{$1.gsub("/", "-")}"
78
+ return "shoes-#{$1.gsub('/', '-')}"
79
79
  end
80
80
 
81
81
  def write_backend(generator_file, bin_dir)
data/lib/shoes/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Shoes
2
- VERSION = "4.0.0.pre4"
2
+ VERSION = "4.0.0.pre5"
3
3
  end
data/shoes-core.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.description = "Shoes is the best little GUI toolkit for Ruby. Shoes makes building for Mac, Windows, and Linux super simple. This is the DSL for writing your app. You'll need a backend to run it."
13
13
  s.license = 'MIT'
14
14
 
15
- s.files = `git ls-files`.split($/)
15
+ s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
16
16
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
17
17
  s.require_paths = ["lib"]
18
18
 
@@ -1,4 +1,4 @@
1
- require 'shoes/spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  shared_examples_for Shoes::Animation do
4
4
  it "should start" do
@@ -60,7 +60,7 @@ describe Shoes::Animation do
60
60
  it { is_expected.not_to be_stopped }
61
61
 
62
62
  describe "with framerate" do
63
- let(:opts) { {:framerate => 36, :app => app} }
63
+ let(:opts) { {framerate: 36, app: app} }
64
64
 
65
65
  it "sets framerate" do
66
66
  expect(subject.framerate).to eq(36)
@@ -1,4 +1,4 @@
1
- require 'shoes/spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe Shoes::App do
4
4
  let(:input_blk) { Proc.new {} }
@@ -64,7 +64,7 @@ describe Shoes::App do
64
64
  end
65
65
 
66
66
  context "from opts" do
67
- let(:opts) { {:width => 150, :height => 2, :title => "Shoes::App Spec", :resizable => false} }
67
+ let(:opts) { {width: 150, height: 2, title: "Shoes::App Spec", resizable: false} }
68
68
 
69
69
  it "sets width", :qt do
70
70
  expect(subject.width).to eq opts[:width]
@@ -125,11 +125,9 @@ describe Shoes::App do
125
125
  it "passes default to objects" do
126
126
  expect(subject.line(0, 100, 100, 0).style[key]).to eq(value)
127
127
  end
128
-
129
128
  end
130
129
  end
131
130
 
132
-
133
131
  describe "default styles" do
134
132
  it "are independent among Shoes::App instances" do
135
133
  app1 = Shoes::App.new
@@ -140,7 +138,6 @@ describe Shoes::App do
140
138
 
141
139
  # .. but does not affect app2
142
140
  expect(app2.line(0, 100, 100, 0).style[:strokewidth]).not_to eq(10)
143
-
144
141
  end
145
142
  end
146
143
  end
@@ -164,7 +161,6 @@ describe Shoes::App do
164
161
  expect(subject.line(0, 100, 100, 0).style[style]).to eq('val')
165
162
  end
166
163
  end
167
-
168
164
  end
169
165
 
170
166
  describe "connecting with gui" do
@@ -234,7 +230,7 @@ describe Shoes::App do
234
230
  expect(app).not_to be_fullscreen
235
231
  end
236
232
 
237
- it 'can enter fullscreen' do
233
+ it 'can enter fullscreen', :fullscreen do
238
234
  app.fullscreen = true
239
235
  expect(app).to be_fullscreen
240
236
  end
@@ -248,18 +244,15 @@ describe Shoes::App do
248
244
  app.fullscreen = false
249
245
  end
250
246
 
251
- # Failing on Mac fullscreen doesnt seem to work see #397
252
- it 'is not in fullscreen', :fails_on_osx do
247
+ it 'is not in fullscreen', :fullscreen do
253
248
  expect(app).not_to be_fullscreen
254
249
  end
255
250
 
256
- # Failing on Mac fullscreen doesnt seem to work see #397
257
- it 'has its origina', :fails_on_osx do
251
+ it 'has its original', :fullscreen do
258
252
  expect(app.width).to eq(defaults[:width])
259
253
  end
260
254
 
261
- # Failing on Mac fullscreen doesnt seem to work see #397
262
- it 'has its original height', :fails_on_osx do
255
+ it 'has its original height', :fullscreen do
263
256
  expect(app.height).to eq(defaults[:height])
264
257
  end
265
258
  end
@@ -311,7 +304,6 @@ describe Shoes::App do
311
304
  expect(my_parent).to eq my_stack
312
305
  end
313
306
  end
314
-
315
307
  end
316
308
 
317
309
  describe "additional context" do
@@ -352,7 +344,6 @@ describe Shoes::App do
352
344
  end
353
345
 
354
346
  describe 'subscribing to DSL methods' do
355
-
356
347
  class TestSubscribeClass
357
348
  attr_reader :app
358
349
  def initialize(app)
@@ -384,7 +375,6 @@ describe Shoes::App do
384
375
  end
385
376
 
386
377
  describe '.new_dsl_method (for widget method notifications etc.)' do
387
-
388
378
  before :each do
389
379
  Shoes::App.new_dsl_method :widget_method do
390
380
  # noop
@@ -417,7 +407,6 @@ describe Shoes::App do
417
407
  it {is_expected.not_to include :parent, :app}
418
408
  end
419
409
  end
420
-
421
410
  end
422
411
  end
423
412