Skip to content

Commit

Permalink
RSpec.describe => describe for consistency across the suite; minor sp…
Browse files Browse the repository at this point in the history
…ec_helper.rb edits
  • Loading branch information
markets committed May 21, 2018
1 parent de4f9de commit 727a865
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion spec/helpers/application_helper_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper'

RSpec.describe ApplicationHelper do
describe ApplicationHelper do
it 'avatar_url returns url to gravatar' do
user = Fabricate(:user)
gravatar_id = Digest::MD5::hexdigest(user.email).downcase
Expand Down
2 changes: 1 addition & 1 deletion spec/helpers/glyph_helper_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper'

RSpec.describe GlyphHelper do
describe GlyphHelper do
describe 'glyph helper' do
it 'renders an span with glyphicon classes' do
expect(helper.glyph('foo')).to match(/<span class=\"glyphicon glyphicon-foo\"><\/span>/)
Expand Down
6 changes: 2 additions & 4 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
require 'selenium/webdriver'
require 'faker'
require 'shoulda/matchers'

I18n.reload!

Capybara.register_driver :chrome do |app|
Expand All @@ -36,7 +37,7 @@
# in spec/support/ and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }

# Make sure schem persists when running tests.
# Make sure schema persists when running tests.
# We ran into an error that forced us to run rake db:migrate RAILS_ENV=test
# before running tests. This kind of fixes it, although we should have a closer
# look at this and find a better solution
Expand Down Expand Up @@ -67,15 +68,12 @@
# the seed, which is printed after each run.
# --seed 1234

puts "Randomized with seed #{config.seed}."

config.register_ordering(:global) do |items|
items_by_type = items.group_by { |item| item.metadata[:type] === :feature ? :feature : :rest }

feature_specs = items_by_type[:feature] || []
rest_of_specs = items_by_type[:rest] || []


random = Random.new(config.seed)

[
Expand Down

0 comments on commit 727a865

Please # to comment.