Skip to content

Instantly share code, notes, and snippets.

View idengager's full-sized avatar

Kasia Jarmołkowicz idengager

View GitHub Profile

Keybase proof

I hereby claim:

  • I am idengager on github.
  • I am idengager (https://keybase.io/idengager) on keybase.
  • I have a public key ASCckg3paMpzl2Pfnh__YRwcARFhYoMuxE7d_WsLkgs3ewo

To claim this, I am signing this object:

describe "labels" do
it "should have field for comeptition name" do
expect(page).to have_field(
I18n.t('activerecord.attributes.competition.name'))
end
it "should have field for classification" do
expect(page).to have_field(
I18n.t('activerecord.attributes.competition.classification'))
end
@idengager
idengager / shelly-cloud.md
Last active August 29, 2015 14:00
Deploy on Shelly guide for Nitrous.io

Deploying a Rails app to Shelly Cloud

Shelly Cloud is a PaaS (Platform as a Service) hosting provider, dedicated for Ruby on Rails apps.

This tutorial assumes you have already initialized a git repository – take a look at the Github's guide if that isn't the case. If you get stuck at any point in this guide, take a look at the docs or use one of our support channels.

1. Prepare your app for deployment

First, make sure your app uses one of Shelly Cloud's supported databases. Second, you are advised to use the shelly-dependecies gem to take care of gem dependencies. Add the following lines to your Gemfile:

@idengager
idengager / candy.rb
Last active August 29, 2015 13:55
Fancy
candy_to_bring = "prince polo"
candy_to_bring += " and danusia" if danusia.is_in_the_shop?
require 'spec_helper'
describe 'Create event' do
before do
stub_request(:get, "http://calendar-api.shellyapp.com/events/new?token=")
.to_return(status: 200, body: { message: {}.to_json }, headers: {})
end
it 'should render new event form' do
visit '/events/new'
@idengager
idengager / gist:7597445
Created November 22, 2013 09:46
Event#index tests
require 'spec_helper'
describe 'Event index' do
context 'when user is not signed-in' do
before do
stub_request(:get, "http://localhost:9292/events?token=").
to_return(status: 200, body: { message: [public_event, private_event, past_event, future_event] }.to_json, headers: {})
visit '/events'
end
@idengager
idengager / gist:7543959
Created November 19, 2013 11:23
AccessDenied
require 'spec_helper'
describe 'User.show' do
include CalendarApp
context 'when user is not logged in' do
before { get 'users/non-existent-id' }
it 'should return HTTP 403' do
last_response.status.should == 403