lib/assert/view.rb in assert-2.16.5 vs lib/assert/view.rb in assert-2.17.0
- old
+ new
@@ -1,9 +1,9 @@
-require 'assert/config'
-require 'assert/config_helpers'
-require 'assert/suite'
-require 'assert/view_helpers'
+require "assert/config"
+require "assert/config_helpers"
+require "assert/suite"
+require "assert/view_helpers"
module Assert
class View
include Assert::ConfigHelpers
@@ -13,37 +13,37 @@
# require views by passing either a full path to the view ruby file
# or passing the name of a view installed in ~/.assert/views
def self.require_user_view(view_name)
views_file = File.expand_path(
- File.join("#{ENV['HOME']}/.assert/views", view_name, 'lib', view_name)
+ File.join("#{ENV["HOME"]}/.assert/views", view_name, "lib", view_name)
)
- if File.exists?(view_name) || File.exists?(view_name + '.rb')
+ if File.exists?(view_name) || File.exists?(view_name + ".rb")
require view_name
- elsif File.exists?(views_file + '.rb')
+ elsif File.exists?(views_file + ".rb")
require views_file
else
msg = "[WARN] Can't find or require #{view_name.inspect} view."
msg << " Did you install it in `~/.assert/views`?" if !view_name.match(/\A\//)
warn msg
end
end
# setup options and their default values
- option 'styled', false
- option 'pass_styles' # none
- option 'fail_styles' # none
- option 'error_styles' # none
- option 'skip_styles' # none
- option 'ignore_styles' # none
+ option "styled", false
+ option "pass_styles" # none
+ option "fail_styles" # none
+ option "error_styles" # none
+ option "skip_styles" # none
+ option "ignore_styles" # none
- option 'pass_abbrev', '.'
- option 'fail_abbrev', 'F'
- option 'ignore_abbrev', 'I'
- option 'skip_abbrev', 'S'
- option 'error_abbrev', 'E'
+ option "pass_abbrev", "."
+ option "fail_abbrev", "F"
+ option "ignore_abbrev", "I"
+ option "skip_abbrev", "S"
+ option "error_abbrev", "E"
attr_reader :config
def initialize(config, output_io)
@config , @output_io, = config, output_io