Skip to content

Commit

Permalink
Define classes as constants
Browse files Browse the repository at this point in the history
  • Loading branch information
tfausak committed Jul 30, 2015
1 parent 66a9fa0 commit c2e91af
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions spec/active_interaction/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

require 'spec_helper'

class InteractionWithFilter < TestInteraction
InteractionWithFilter = Class.new(TestInteraction) do
float :thing
end

class InteractionWithDateFilter < TestInteraction
InteractionWithDateFilter = Class.new(TestInteraction) do
date :thing
end

class AddInteraction < TestInteraction
AddInteraction = Class.new(TestInteraction) do
float :x, :y

def execute
x + y
end
end

class InterruptInteraction < TestInteraction
InterruptInteraction = Class.new(TestInteraction) do
object :x, :y,
class: Object,
default: nil
Expand Down
2 changes: 1 addition & 1 deletion spec/active_interaction/concerns/active_recordable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require 'spec_helper'

class InteractionWithFloatFilter < TestInteraction
InteractionWithFloatFilter = Class.new(TestInteraction) do
float :thing
end

Expand Down
2 changes: 1 addition & 1 deletion spec/active_interaction/i18n_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
end
end

class I18nInteraction < TestInteraction
I18nInteraction = Class.new(TestInteraction) do
hash :a do
hash :x
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require 'spec_helper'

class ArrayInteraction < TestInteraction
ArrayInteraction = Class.new(TestInteraction) do
array :a do
array
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'spec_helper'
require 'action_dispatch'

class FileInteraction < TestInteraction
FileInteraction = Class.new(TestInteraction) do
file :a
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require 'spec_helper'

class HashInteraction < TestInteraction
HashInteraction = Class.new(TestInteraction) do
hash :a do
hash :x
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require 'json'
require 'yaml'

class InterfaceInteraction < TestInteraction
InterfaceInteraction = Class.new(TestInteraction) do
interface :anything
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require 'spec_helper'

class ObjectInteraction < TestInteraction
ObjectInteraction = Class.new(TestInteraction) do
object :object
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def ==(other)
end
end

class TimeInteraction < TestInteraction
TimeInteraction = Class.new(TestInteraction) do
time :a
end

Expand Down

0 comments on commit c2e91af

Please sign in to comment.