capybara needs qt5 to work with react. OSX probably has qt 4 installed by default.
thoughtbot/capybara-webkit#666
brew uninstall qt
brew install qt5
brew linkapps qt5
brew doctor
gem uninstall capybara-webkit
capybara needs qt5 to work with react. OSX probably has qt 4 installed by default.
thoughtbot/capybara-webkit#666
brew uninstall qt
brew install qt5
brew linkapps qt5
brew doctor
gem uninstall capybara-webkit
ruby /Users/evan/.rvm/gems/ruby-2.1.1/bin/rspec spec/controllers/api/v1/messages_controller_spec.rb(1245,0x7fff792bf310) malloc: *** error for object 0x7ff15fb73c00: pointer being freed was not allocated | |
*** set a breakpoint in malloc_error_break to debug | |
Abort trap: 6 |
var helper = require('../helpers/signinHelper') | |
describe('Adding friends', function(){ | |
beforeEach(function(){ | |
helper.login(); | |
}) | |
afterEach(function(){ | |
browser.manage().deleteAllCookies(); |
var gulp = require('gulp'); | |
var connect = require('gulp-connect'); | |
var modRewrite = require('connect-modrewrite'); | |
var runSequence = require('run-sequence'); | |
var shell = require('gulp-shell'); | |
//proxy all requests to /api to localhost:3000 for rails api | |
gulp.task('connect', function(){ | |
connect.server({ | |
root: './app', |
// It is important to declare your variables. | |
(function() { | |
var foo = 'Hello, world!'; | |
print(foo); //=> Hello, world! | |
})(); | |
// Because if you don't, the become global variables. | |
(function() { |
.directive('mailBox', function(OneMessage){ | |
return { | |
restrict: 'E', | |
templateUrl: './ui/messages/mailbox.html', | |
scope: { | |
messages: '=messages' | |
}, | |
//wow this actual works, scope is $scope? | |
link: function(scope, element, attrs) { | |
scope.getMessage = function(id) { |
Matchers are same as selenium webdriver matchers! | |
//url matcher | |
expect(brower.getCurrentUrl()).toMatch(/\/yourmom/); | |
//by ng-model | |
//match input form value | |
locationInput = element(by.model('signup.location')); | |
expect(locationInput.getAttribute("value")).toMatch(/boston/); |
var app = angular.module('app', []); | |
(function(){ | |
angular.module('app', []); | |
}); | |
angular.module('app', []); |
//factory returns entire API response, controller is responsible for parsing the return value | |
.factory('CapitalData', function(API_AUTH, $http, $q, SEARCH_PATH){ | |
return function(countryId, capital){ | |
var defer = $q.defer(); | |
$http.get(SEARCH_PATH+'&name_equals='+capital+'&country='+countryId+API_AUTH) | |
.success(function(data){ | |
defer.resolve(data); | |
}); | |
return defer.promise; |