Displaying 20 results from an estimated 30000 matches similar to: "[OT] betterspecs.org | rspec best practices"
2006 May 22
0
[OT] form design best practices for autofill?
This is off-topic from Rails though what I learn from any responses
will be used in a Rails app.
My app has a sign-up facility where I request a user''s first name,
last name, address, etc. Are there any best practices for naming the
field elements so the autofill functions in Firefox, Explorer, Safari
and others can pick up the names and autofill the form?
Thanks for any tips or
2009 Apr 08
1
OT iSCSI best practices
Hi,
I have an HP MSA 2000i as SAN (iSCSI) and since I'm starting with SANs,
I'm seeking for advice. We are currently using HP Proliant 380 G5 + MSA
70 (SAS, direct-attached storage) for our production servers.
At first, I thought I'd be using the SAN only for non-critical
operations, like temporary additional storage for disk-based backups and
snapshots, so I planned on using
2008 Aug 14
1
[OT] VPN/DMZ best practices
There is such a wealth of knowledge and personal experience on this list
that I'd like to get your opinions on our current situation.
Currently, we have a simple tri-homed firewall with the internal network
on one interface, the dmz on another, and the dirty internet on the
last. Also, there is a spare interface on the box which is unused. We
use CentOS and manually maintain our rule sets
2007 May 11
1
[Somewhat OT] Integrating RSpec and RCov results in Gem''s RDoc
I have a Gem on which the testing is done with RSpec. I would like to
include the results of RSpec and the RCov html files in the RDoc.
The problem is that when I have RDoc include the files, it winds up
escaping all the html. Is there a way to get HTML into RDoc
unprocessed? Or is there some other way I can distribute the RSpec/RCov
results with my Gem integrated with RDoc? I can include
2011 Jan 06
1
View specs - best practices
Howdy,
I''m trying to test some mailer views (which is no different to normal
views in terms of specs)... ran into the following problem...
In adherence to the "one expectation per ''spec''"... I''m trying to
write the following
describe "auth/mailer/signup.html.erb" do
before(:each) do
@user = Factory.build(:user)
assign(:user,
2012 Aug 04
4
Rspec
Hi all i''m trying to learn Rspec testing can anyone suggest me the best
book to learn Rspec with good sample code.
Thanks in advance
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group,
2012 Sep 18
4
"best practices" for Rails serving RESTful JSON services for use by AngularJS, Ember.js, etc.
I''ve been writing a gem to implement and extend common controller
functionality so that Rails can be used with Javascript frameworks like
AngularJS (which we are using), Ember.js, etc. in such a way that the user
doesn''t have to tweak a a bunch of rails g controller boilerplate code to
provide services for use in these frameworks that in turn would require
various changes to
2010 Nov 16
4
view.should render_template best practices?
I''ve been looking for the definitive answer for months now, and the
RSpec book doesn''t touch on it at all:
How do we now handle stubbing out rendering of partials in view specs
in RSpec2?
I have a large (35K+ lines of views and related specs) that I''m trying
to upgrade to Rails3/RSpec2. My views use partials pretty extensively
and this issue is a huge blocker for me.
2012 Nov 18
3
remarkable activerecord association RSpec
i''m using gem Remarkable activerecord for association. i''ve installed
remarkable and remarkable activerecrod both gem. i''ve added both gem in
my Gemfile. i''ve added "remarkable_activerecord" as required in
spec_helper.rb.
describe Authentication do
FactoryGirl.build(:authentication).should
belong_to(:user)
2013 Aug 30
3
rspec-puppet not working
I''m trying to get rspec-puppet working and have run into a problem. I have
a VM running ubuntu lucid, have installed rubygems 1.3.5 from the apt
package and have install rspec-puppet (and other required gems), and rake,
using gem install.
I''ve run rspec-puppet-init in the module I want to test, and have created a
very basic spec file for one of the classes in my module.
2012 Nov 12
7
RSpec: controller POST create
Rails 3.1.3
rspec-rails (2.11.4)
rspec 2.11.1
I am new to rspec. I don''t quite understand tests for POST create part.
I have generated scaffold, and simultaneously it generated
controller_spec.rb as well.
it "assigns a newly created plan as @plan" do
post :create, {:plan => valid_attributes}, valid_session
assigns(:plan).should be_a(Plan)
2012 Sep 15
2
[RSpec Testing] Methods take two arguments
Hello,
Here is my *pdf_helper.rb* => http://pastebin.com/QU1kTKXk. I want to test,
if self.create method can take more than two arguments. But, when I try to
run my test. It showed
*PdfHelper Should have two arguments
Failure/Error:
create_pdf.should_receive(object,template).with(user,file)
NameError:
undefined local variable or method `create_pdf'' for
2013 Nov 22
2
Cancan Rspec load_and_authorize_resource
Hello!
While running bundle exec rake, I receive following error (see in
attached file)
However, my tests are steel passing with command rspec spec/controllers/
Some info:
ads_controller.rb:
class AdsController < ApplicationController
load_and_authorize_resource except: :create
end
ads_controller_spec.rb:
require ''spec_helper''
describe AdsController do
render_views
2013 Jun 27
5
Is it possible to pass extra flags to Puppet via rspec?`
Hello,
I''m writing my first puppet function rspec test and am having a problem
which I don''t see how to solve.
The function (and the test) involve access to files through the File
Server. In order for the function (and the test) to work I need to pass
"--fileserverconf=fileserver.conf" parameter to Puppet.
So far I haven''t found a way to do that.
If I
2012 Dec 17
3
Rspec with rspec-hiera-puppet
I''ve been working on getting spec tests on all of my modules and am down to ones that use hiera and don''t have any reasonable defaults. It looks like there is a project on GH (https://github.com/amfranz/rspec-hiera-puppet) that is designed to fill this need, but for the life of me I cannot make it work. FriedBob helped out on the IRC channel some with his solution of including
2013 Sep 17
6
rspec-puppet require syntax
Can someone tell me the correct way to specify the following require
statement in an rspec-puppet test?
*require =>
[Class[''ssl''],Class[''pcre3''],Staging::Extract["nginx-${version}.tar.gz"]]*
I tried this: *''require'' =>
2013 Jun 18
1
Getting rspec error: Net::SMTPServerBusy: Relay access denied
I''m trying to test registration emails (sent with devise), and I keep
getting the error:
Net::SMTPServerBusy: 454 4.7.1 <model_spec-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>: Relay access denied
I''m running Rails 3.2.11 with Capybara, and I have (temporarily) chopped my
spec_helper.rb and test.rb files down to the bare minimum, still getting
the error above.
2006 Jun 01
0
OT: Best practice for multi-user select boxes
I''m working on an application where several customers will be using the same
database. I want them to be able to build their own entries for various
drop-down lists is if they were the only user of the application. I also
don''t want to make building the drop-lists any harder than they need to be.
I have thought of two ways to do this. I''d appreciate feedback and
2014 Feb 20
0
Best practices: client/server VS Git
Hello there,
i'm actually learning Puppet in order to pass the exam.
I have no professional experience on the product yet, and wanting some
feedback from you professional devops.
For the moment i see 2 ways for Puppet to synchronize nodes:
-Puppet client/server way with a puppetmaster node
-Decentralized way, with node pull their configuration from a Git repo and
make a puppet apply on their
2013 Jul 19
0
Best practices for capybara's features spec?
Hi,
I realy like to use capybara''s features spec but I have some questions
about the organisation :
1. How should I group the features specs?
-----------------------------------------
For the moment, I try to group by controllers. For example, I can have a
file "users_spec.rb", "artists_spec.rb", etc... Maybe it''s better to group
by user story... What do