Skip to content

Setup page type lint specs #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ lib/bundler/man
pkg
rdoc
spec/reports
spec/dummy
test/tmp
test/version_tmp
tmp
Expand Down
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: ruby
rvm: 2.5

# User container based travis infrastructure which allows caching
# features for open source projects.
sudo: false
cache: bundler

script:
- bin/rspec
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Pageflow Before After

[![Gem Version](https://badge.fury.io/rb/pageflow-before-after.svg)](http://badge.fury.io/rb/pageflow-before-after)
[![Build Status](https://travis-ci.org/codevise/pageflow-before-after.svg?branch=master)](https://travis-ci.org/codevise/pageflow-before-after)

Page type showing before/after image sliders (Digit style).

Expand Down
29 changes: 29 additions & 0 deletions bin/rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'rspec' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

bundle_binstub = File.expand_path("../bundle", __FILE__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

load Gem.bin_path("rspec-core", "rspec")
3 changes: 3 additions & 0 deletions pageflow-before-after.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Gem::Specification.new do |spec|

spec.add_dependency 'jquery-ui-rails', '~> 5.0'

spec.add_development_dependency 'pageflow-support', '~> 13.6.x'
spec.add_development_dependency 'rspec-rails', '~> 3.0'

# Semantic versioning rake tasks
spec.add_development_dependency 'semmy', '~> 1.0'
end
4 changes: 4 additions & 0 deletions spec/integration/page_type_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require 'spec_helper'
require 'pageflow/lint'

Pageflow::Lint.page_type(Pageflow::BeforeAfter.page_type)
14 changes: 14 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ENV['RAILS_ENV'] ||= 'test'
ENV['PAGEFLOW_PLUGIN_ENGINE'] = 'pageflow_before_after'

require 'pageflow/support'
Pageflow::Dummy.setup

require 'rspec/rails'

engine_root = File.join(File.dirname(__FILE__), '..')
Dir[File.join(engine_root, 'spec/support/**/*.rb')].each { |file| require(file) }

RSpec.configure do |config|
config.use_transactional_fixtures = true
end