lib/balboa/interactor/capybara_interactor.rb in balboa-0.1.4 vs lib/balboa/interactor/capybara_interactor.rb in balboa-0.1.5
- old
+ new
@@ -1,23 +1,22 @@
# frozen_string_literal: true
module Balboa
module Interactor
class CapybaraInteractor
-
CommandNotFound = Class.new(RuntimeError)
LoginCommandNotFound = Class.new(RuntimeError)
attr_reader :options
- def initialize(options={})
+ def initialize(options = {})
@options = options
- @commands = Hash.new { fail CommandNotFound }
+ @commands = Hash.new { raise CommandNotFound }
@signed_in = false
end
-
+
def add_command(key, command)
@commands[key.to_s] = command
end
def last
@@ -32,10 +31,12 @@
private
attr_accessor :signed_in
- alias_method :signed_in?, :signed_in
+ def signed_in?
+ signed_in
+ end
def login
@commands['login'].execute
@signed_in = true