Github
Alternative: Bitbucket, git (private server)
None
| # updated from the original @ http://cheat.errtheblog.com/s/rspec_shoulda | |
| # just a subset -- models -- is included here. I'll update this, and create cheat sheets for others, as I go along. | |
| # I marked the ones I added with NEW and also added the links to the corresponding code, as I think it's useful. | |
| # Any comments/corrections are welcome! | |
| # ================= Data and Associations ======================= | |
| # https://github.com/thoughtbot/shoulda-matchers/tree/master/lib/shoulda/matchers/active_record | |
| it { is_expected.not_to have_db_column(:admin).of_type(:boolean) } | |
| it { is_expected.to have_db_column(:salary). |
| # TODO: Your gem name | |
| [![Gem Version][GV img]][Gem Version] | |
| [![Build Status][BS img]][Build Status] | |
| [![Dependency Status][DS img]][Dependency Status] | |
| [![Code Climate][CC img]][Code Climate] | |
| [![Coverage Status][CS img]][Coverage Status] | |
| ## Description |
| Spree.config do |config| | |
| # Amazon S3 | |
| config.use_s3 = true | |
| config.s3_bucket = 'mybucket' | |
| config.s3_access_key = ENV['S3_ACCESS_KEY_ID'] | |
| config.s3_secret = ENV['S3_SECRET_ACCESS_KEY'] | |
| config.attachment_url = ':s3_eu_url' | |
| config.s3_host_alias = 's3-eu-west-1.amazonaws.com' # EU | |
| RSpec.describe 'locale:' do | |
| Dir.glob('config/locales/*.yml') do |locale_file| | |
| context locale_file do | |
| it { is_expected.to be_parseable } | |
| it { is_expected.to have_valid_pluralization_keys } | |
| it { is_expected.not_to have_missing_pluralization_keys } | |
| it { is_expected.to have_one_top_level_namespace } | |
| it { is_expected.not_to have_legacy_interpolations } | |
| it { is_expected.to have_a_valid_locale } | |
| it { is_expected.to be_a_complete_translation_of 'config/locales/en.yml' } |
| # in your code | |
| binding.pry | |
| # pry console | |
| require 'factory_girl' | |
| require 'spree/testing_support/factories' # spree core factories | |
| FactoryGirl.find_definitions # extension factories | |
| # orders | |
| FactoryGirl.create :order_with_totals |
| # Navigating | |
| visit '/projects' | |
| visit post_comments_path(@post) | |
| # Clicking links and buttons | |
| click_link 'id_of_link' | |
| click_link 'Link Text' | |
| click_button 'Save' |
| /** | |
| * Letterpress text Fx | |
| * Issue: text shadow need to go on inside. | |
| */ | |
| @font-face { | |
| font-family: 'LeagueGothicRegular'; | |
| src: url('http://www.midwinter-dg.com/blog_demos/css-text-shadows/fonts/league_gothic-webfont.eot'); | |
| src: url('http://www.midwinter-dg.com/blog_demos/css-text-shadows/fonts/league_gothic-webfont.eot?iefix') format('eot'), | |
| url('http://www.midwinter-dg.com/blog_demos/css-text-shadows/fonts/league_gothic-webfont.woff') format('woff'), |
| /** | |
| * Letterpress text Fx | |
| * Issue: text shadow need to go on inside. | |
| */ | |
| @import url(http://fonts.googleapis.com/css?family=Monofett|Crushed|Voces|Quattrocento|Open+Sans|Play|Yanone+Kaffeesatz|Carrois+Gothic+SC|Zeyada|Covered+By+Your+Grace|Allura); | |
| body { | |
| text-align:center; | |
| background: url(http://www.midwinter-dg.com/blog_demos/css-text-shadows/images/letterpress.gif) repeat; |