sudo /usr/sbin/groupadd rvm
sudo /usr/sbin/usermod -a -G wheel,rvm USERNAME
sudo apt-get install build-essential git-core curl python-software-properties libsasl2-dev mailutils
sudo su -
\curl -L https://get.rvm.io | bash -s stable --ruby
## 1.9.2 | |
# rspec | |
real 0m27.321s | |
user 0m24.619s | |
sys 0m2.417s | |
# cucumber | |
real 1m10.722s | |
user 0m56.713s | |
sys 0m3.843s |
sudo /usr/sbin/groupadd rvm
sudo /usr/sbin/usermod -a -G wheel,rvm USERNAME
sudo apt-get install build-essential git-core curl python-software-properties libsasl2-dev mailutils
sudo su -
\curl -L https://get.rvm.io | bash -s stable --ruby
# orders.rb | |
scope :last_week, lambda { orders.where(purchased_at: 1.week.ago..Time.zone.now) } | |
# venue.rb | |
def timeline_summary | |
[["LW", :last_week], ["LM", :last_month], ["4M", :4_months]].collect do |value| | |
{ label: value[0] | |
value: self.orders.send(value[1]).count } | |
end | |
end |
%h1 New vendor | |
= render 'form' | |
= link_to 'Cancel', vendors_path, id: :cancel_new_vendor_link | |
--------------------- | |
_form.html.haml | |
= form_for @vendor, :html => { :class => 'form-horizontal' } do |f| |
class ACC.Views.EssentialsAssessment.Index extends Backbone.View | |
template : JST['programs/essentials_assessments/index'] | |
events : => | |
"click [role=next]" : "goToX" | |
initialize : => | |
@model.Videos.on 'reset', @loadViews | |
render : => |
TravelPrototype::Application.routes.draw do | |
root to: 'welcome#index' | |
get "/:page", to: "welcome#page" | |
end |
Testing React kinda sucks, here's some techniques I've used to get the basics done quickly... Basically there's three main ingredients I'm using to do my tests in Karma:
This gives me the basic option to be able to click things in the component based on the ref name. React's test utils do provide it's own selectors for this stuff like Capybara but the API sucks / I found this was easier and more productive.
Example:
I hereby claim:
To claim this, I am signing this object: