Automated testing is really widespread these days and of course Ruby has its own set of tools. One of these is RSpec, an insanely popular tool for automated testing. The good thing about it is we can test nearly every aspect of the app with ease. If you don’t set up automated testing, you’ll end up having to manually re-test all the features of your app every time you refactor the code or add something new. For large apps this becomes really tedious!

In this screencast series we are going to have a look at using RSpec and supporting libraries like Capybara and FactoryGirl with Rails. You’ll even get to write your first spec!

Loading the player…

jwplayer(“video-5880”).setup({
image: “https://d3rj1gznkm47xj.cloudfront.net/5ff6906c-a02f-48f3-aa62-a19630949fbd.png”,
sources: [
{
file: “https://d3rj1gznkm47xj.cloudfront.net/6057467c6f80521069bbb2fcdbd12a50.mp4”,
label: “SD”
},
{
file: “https://d3rj1gznkm47xj.cloudfront.net/dfffb7487bfdd270a2b522d50b3f8cee.mp4”,
label: “HD”
},
],
tracks: [
{
file: “http://djdvv9xnh2mt5.cloudfront.net/4c506879-85a1-4cbf-a853-8cba98301a2d.srt”,
“default”: true
}
],
aspectratio: “16:9”,
width: “100%”,
height: “480px”,
fallback: true,
primary: “flash”,
streaming: false,
analytics: {
enabled: false,
cookies: false
},
captions: {
back: false,
fontsize: 12
},
advertising: {
client: “googima”,
schedule: {
“myAds”: {
“offset”: “pre”,
“tag”: “https://pubads.g.doubleclick.net/gampad/ads?sz=855x483u0026iu=/7448792/Videou0026cust_params=[post_id]%3Dstaging%26channel%3D[channel]u0026impl=su0026gdfp_req=1u0026env=vpu0026output=xml_vast2u0026unviewed_position_start=1u0026url=[url]/u0026description_url=[description_url]u0026correlator=[timestamp]”
}
}
}
});

Continue reading %Watch: RSpec — The Set Up%

Source: SitePoint